fix code style

This commit is contained in:
deepak1556 2016-12-07 12:58:53 +05:30 committed by Kevin Sawicki
parent f124732431
commit 5d94221c61
2 changed files with 10 additions and 2 deletions

View file

@ -554,8 +554,16 @@ void Session::CreateInterruptedDownload(const mate::Dictionary& options) {
options.Get("lastModified", &last_modified);
options.Get("eTag", &etag);
options.Get("startTime", &start_time);
if (path.empty() || url_chain.empty() || length == 0 || offset >= length)
if (path.empty() || url_chain.empty() || length == 0) {
isolate()->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate(), "Must pass non-empty path, urlChain and length.")));
return;
}
if (offset >= length) {
isolate()->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate(), "Must pass an offset value less than length.")));
return;
}
auto download_manager =
content::BrowserContext::GetDownloadManager(browser_context());
download_manager->GetDelegate()->GetNextId(base::Bind(