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

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

Issue 8373021: Convert URLFetcher::Delegates to use an interface in content/public/common. Also remove the old U... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and remove unncessary forward declares 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
===================================================================
--- chrome/browser/chromeos/login/profile_image_downloader.cc (revision 106929)
+++ chrome/browser/chromeos/login/profile_image_downloader.cc (working copy)
@@ -18,6 +18,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/net/gaia/gaia_constants.h"
#include "content/browser/browser_thread.h"
+#include "content/common/net/url_fetcher.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -155,9 +156,8 @@
void ProfileImageDownloader::OnURLFetchComplete(const URLFetcher* source) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- const std::string& data = source->GetResponseStringRef();
-
+ std::string data;
+ source->GetResponseAsString(&data);
if (source->response_code() != 200) {
LOG(ERROR) << "Response code is " << source->response_code();
LOG(ERROR) << "Url is " << source->url().spec();
@@ -186,7 +186,8 @@
profile_image_fetcher_->Start();
} else if (source == profile_image_fetcher_.get()) {
VLOG(1) << "Decoding the image...";
- scoped_refptr<ImageDecoder> image_decoder = new ImageDecoder(this, data);
+ scoped_refptr<ImageDecoder> image_decoder = new ImageDecoder(
+ this, data);
image_decoder->Start();
}
}

Powered by Google App Engine
This is Rietveld 408576698