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

Side by Side Diff: chrome/browser/chromeos/login/image_downloader.cc

Issue 8416020: Handle additional feedback from http://codereview.chromium.org/8395038/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/image_downloader.h" 5 #include "chrome/browser/chromeos/login/image_downloader.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 ImageDownloader::~ImageDownloader() {} 42 ImageDownloader::~ImageDownloader() {}
43 43
44 void ImageDownloader::OnURLFetchComplete(const content::URLFetcher* source) { 44 void ImageDownloader::OnURLFetchComplete(const content::URLFetcher* source) {
45 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 45 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
46 std::string data; 46 std::string data;
47 source->GetResponseAsString(&data); 47 source->GetResponseAsString(&data);
48 if (source->GetResponseCode() != 200) { 48 if (source->GetResponseCode() != 200) {
49 LOG(ERROR) << "Response code is " << source->GetResponseCode(); 49 LOG(ERROR) << "Response code is " << source->GetResponseCode();
50 LOG(ERROR) << "Url is " << source->GetUrl().spec(); 50 LOG(ERROR) << "Url is " << source->GetURL().spec();
51 LOG(ERROR) << "Data is " << data; 51 LOG(ERROR) << "Data is " << data;
52 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 52 MessageLoop::current()->DeleteSoon(FROM_HERE, this);
53 return; 53 return;
54 } 54 }
55 55
56 VLOG(1) << "Decoding the image..."; 56 VLOG(1) << "Decoding the image...";
57 scoped_refptr<ImageDecoder> image_decoder = new ImageDecoder(delegate_, data); 57 scoped_refptr<ImageDecoder> image_decoder = new ImageDecoder(delegate_, data);
58 image_decoder->Start(); 58 image_decoder->Start();
59 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 59 MessageLoop::current()->DeleteSoon(FROM_HERE, this);
60 } 60 }
61 61
62 } // namespace chromeos 62 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698