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

Side by Side Diff: chrome/browser/profiles/profile_downloader.cc

Issue 8873028: Lower log level for profile errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use dvlog Created 9 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/profiles/profile_downloader.h" 5 #include "chrome/browser/profiles/profile_downloader.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 scopes); 266 scopes);
267 } 267 }
268 268
269 ProfileDownloader::~ProfileDownloader() {} 269 ProfileDownloader::~ProfileDownloader() {}
270 270
271 void ProfileDownloader::OnURLFetchComplete(const content::URLFetcher* source) { 271 void ProfileDownloader::OnURLFetchComplete(const content::URLFetcher* source) {
272 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 272 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
273 std::string data; 273 std::string data;
274 source->GetResponseAsString(&data); 274 source->GetResponseAsString(&data);
275 if (source->GetResponseCode() != 200) { 275 if (source->GetResponseCode() != 200) {
276 LOG(ERROR) << "Response code is " << source->GetResponseCode(); 276 DVLOG(1) << "Response code is " << source->GetResponseCode();
277 LOG(ERROR) << "Url is " << source->GetURL().spec(); 277 DVLOG(1) << "Url is " << source->GetURL().spec();
278 LOG(ERROR) << "Data is " << data; 278 DVLOG(1) << "Data is " << data;
279 delegate_->OnDownloadComplete(this, false); 279 delegate_->OnDownloadComplete(this, false);
280 return; 280 return;
281 } 281 }
282 282
283 if (source == user_entry_fetcher_.get()) { 283 if (source == user_entry_fetcher_.get()) {
284 std::string image_url; 284 std::string image_url;
285 if (!GetProfileNameAndImageURL(data, &profile_full_name_, &image_url, 285 if (!GetProfileNameAndImageURL(data, &profile_full_name_, &image_url,
286 delegate_->GetDesiredImageSideLength())) { 286 delegate_->GetDesiredImageSideLength())) {
287 delegate_->OnDownloadComplete(this, false); 287 delegate_->OnDownloadComplete(this, false);
288 return; 288 return;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 void ProfileDownloader::OnGetTokenSuccess(const std::string& access_token) { 366 void ProfileDownloader::OnGetTokenSuccess(const std::string& access_token) {
367 auth_token_ = access_token; 367 auth_token_ = access_token;
368 StartFetchingImage(); 368 StartFetchingImage();
369 } 369 }
370 370
371 // Callback for OAuth2AccessTokenFetcher on failure. 371 // Callback for OAuth2AccessTokenFetcher on failure.
372 void ProfileDownloader::OnGetTokenFailure(const GoogleServiceAuthError& error) { 372 void ProfileDownloader::OnGetTokenFailure(const GoogleServiceAuthError& error) {
373 LOG(WARNING) << "ProfileDownloader: token request using refresh token failed"; 373 LOG(WARNING) << "ProfileDownloader: token request using refresh token failed";
374 delegate_->OnDownloadComplete(this, false); 374 delegate_->OnDownloadComplete(this, false);
375 } 375 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698