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

Unified Diff: chrome/browser/chromeos/login/profile_image_downloader.cc

Issue 8360003: [cros] OOBE: add histograms for Profile image fetching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 2 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/chromeos/login/profile_image_downloader.cc
diff --git a/chrome/browser/chromeos/login/profile_image_downloader.cc b/chrome/browser/chromeos/login/profile_image_downloader.cc
index 0a6b9cc981b6e8d60b2b16c48c2f26f2792e85f0..1cc7e72572a3a58f6eada2fbbd5c51448d97687e 100644
--- a/chrome/browser/chromeos/login/profile_image_downloader.cc
+++ b/chrome/browser/chromeos/login/profile_image_downloader.cc
@@ -153,17 +153,14 @@ void ProfileImageDownloader::StartFetchingImage() {
ProfileImageDownloader::~ProfileImageDownloader() {}
-void ProfileImageDownloader::OnURLFetchComplete(
- const URLFetcher* source,
- const GURL& url,
- const net::URLRequestStatus& status,
- int response_code,
- const net::ResponseCookies& cookies,
- const std::string& data) {
+void ProfileImageDownloader::OnURLFetchComplete(const URLFetcher* source) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (response_code != 200) {
- LOG(ERROR) << "Response code is " << response_code;
- LOG(ERROR) << "Url is " << url.spec();
+
+ const std::string& data = source->GetResponseStringRef();
+
+ if (source->response_code() != 200) {
+ LOG(ERROR) << "Response code is " << source->response_code();
+ LOG(ERROR) << "Url is " << source->url().spec();
LOG(ERROR) << "Data is " << data;
if (delegate_)
delegate_->OnDownloadFailure();
@@ -177,7 +174,7 @@ void ProfileImageDownloader::OnURLFetchComplete(
delegate_->OnDownloadFailure();
return;
}
- VLOG(1) << "Fetching profile image...";
+ VLOG(1) << "Fetching profile image from " << image_url;
profile_image_fetcher_.reset(
new URLFetcher(GURL(image_url), URLFetcher::GET, this));
profile_image_fetcher_->set_request_context(
« no previous file with comments | « chrome/browser/chromeos/login/profile_image_downloader.h ('k') | chrome/browser/chromeos/login/user_image_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698