| Index: chrome/browser/chromeos/login/profile_image_downloader.cc
|
| ===================================================================
|
| --- chrome/browser/chromeos/login/profile_image_downloader.cc (revision 106795)
|
| +++ 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"
|
| @@ -153,17 +154,13 @@
|
|
|
| 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();
|
| + std::string data;
|
| + CHECK(source->GetResponseAsString(&data));
|
| + 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();
|
| @@ -189,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();
|
| }
|
| }
|
|
|