Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: chrome/browser/net/file_downloader.cc

Issue 1851803002: [NTP Popular Sites] Store country/version in prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/file_downloader.h ('k') | chrome/browser/net/file_downloader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/file_downloader.cc
diff --git a/chrome/browser/net/file_downloader.cc b/chrome/browser/net/file_downloader.cc
index fdc70abd73fd4b177abb151ea0c6cbe6cac8f153..2f7d0448fa9ec901b3faef925a71e31d0d1e80e2 100644
--- a/chrome/browser/net/file_downloader.cc
+++ b/chrome/browser/net/file_downloader.cc
@@ -58,7 +58,7 @@ void FileDownloader::OnURLFetchComplete(const net::URLFetcher* source) {
if (!status.is_success()) {
DLOG(WARNING) << "URLRequestStatus error " << status.error()
<< " while trying to download " << source->GetURL().spec();
- callback_.Run(false);
+ callback_.Run(FAILED);
return;
}
@@ -66,14 +66,14 @@ void FileDownloader::OnURLFetchComplete(const net::URLFetcher* source) {
if (response_code != net::HTTP_OK) {
DLOG(WARNING) << "HTTP error " << response_code
<< " while trying to download " << source->GetURL().spec();
- callback_.Run(false);
+ callback_.Run(FAILED);
return;
}
base::FilePath response_path;
bool success = source->GetResponseAsFilePath(false, &response_path);
if (!success) {
- callback_.Run(false);
+ callback_.Run(FAILED);
return;
}
@@ -89,7 +89,7 @@ void FileDownloader::OnURLFetchComplete(const net::URLFetcher* source) {
void FileDownloader::OnFileExistsCheckDone(bool exists) {
if (exists)
- callback_.Run(true);
+ callback_.Run(EXISTS);
else
fetcher_->Start();
}
@@ -100,5 +100,5 @@ void FileDownloader::OnFileMoveDone(bool success) {
<< local_path_.LossyDisplayName();
}
- callback_.Run(success);
+ callback_.Run(success ? DOWNLOADED : FAILED);
}
« no previous file with comments | « chrome/browser/net/file_downloader.h ('k') | chrome/browser/net/file_downloader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698