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

Unified Diff: chrome/browser/component_updater/url_fetcher_downloader.cc

Issue 216923006: Add a component updater for the CLD2 data file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows file path literals, change android flags back to normal Created 6 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
Index: chrome/browser/component_updater/url_fetcher_downloader.cc
diff --git a/chrome/browser/component_updater/url_fetcher_downloader.cc b/chrome/browser/component_updater/url_fetcher_downloader.cc
index d2d2f3132ed4233b5faf77d42e73f2e6928c30cc..39579cda8e166527dc6c2bd4a3a59eb1ce510bb4 100644
--- a/chrome/browser/component_updater/url_fetcher_downloader.cc
+++ b/chrome/browser/component_updater/url_fetcher_downloader.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/component_updater/url_fetcher_downloader.h"
+#include "base/logging.h"
#include "chrome/browser/component_updater/component_updater_utils.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/load_flags.h"
@@ -42,6 +43,7 @@ void UrlFetcherDownloader::DoStartDownload(const GURL& url) {
url_fetcher_->SetAutomaticallyRetryOn5xx(false);
url_fetcher_->SaveResponseToTemporaryFile(task_runner_);
+ VLOG(1) << "Starting background download: " << url.spec();
url_fetcher_->Start();
download_start_time_ = base::Time::Now();
@@ -78,6 +80,12 @@ void UrlFetcherDownloader::OnURLFetchComplete(const net::URLFetcher* source) {
download_metrics.bytes_total = total_bytes_;
download_metrics.download_time_ms = download_time.InMilliseconds();
+ base::FilePath local_path_;
+ source->GetResponseAsFilePath(false, &local_path_);
+ VLOG(1) << "Downloaded " << downloaded_bytes_ << " bytes in "
+ << download_time.InMilliseconds() << "ms from "
+ << source->GetURL().spec()
+ << " to " << local_path_.value();
CrxDownloader::OnDownloadComplete(is_handled, result, download_metrics);
}
« no previous file with comments | « chrome/browser/component_updater/update_checker.cc ('k') | chrome/browser/translate/translate_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698