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

Unified Diff: chrome/browser/profiles/profile_downloader.cc

Issue 1092223006: [chrome/browser/profiles] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/profiles/profile_downloader.cc
diff --git a/chrome/browser/profiles/profile_downloader.cc b/chrome/browser/profiles/profile_downloader.cc
index ab7237b8016e019f9e56943af8ff45c182d5789f..1b98bcd488cb2fc13eeb8f07bb4dcbcad7fcd007 100644
--- a/chrome/browser/profiles/profile_downloader.cc
+++ b/chrome/browser/profiles/profile_downloader.cc
@@ -205,7 +205,7 @@ void ProfileDownloader::Start() {
void ProfileDownloader::StartForAccount(const std::string& account_id) {
VLOG(1) << "Starting profile downloader...";
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
ProfileOAuth2TokenService* service =
ProfileOAuth2TokenServiceFactory::GetForProfile(
@@ -349,7 +349,7 @@ void ProfileDownloader::OnNetworkError(int response_code) {
}
void ProfileDownloader::OnURLFetchComplete(const net::URLFetcher* source) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
std::string data;
source->GetResponseAsString(&data);
bool network_error =
@@ -371,7 +371,7 @@ void ProfileDownloader::OnURLFetchComplete(const net::URLFetcher* source) {
}
void ProfileDownloader::OnImageDecoded(const SkBitmap& decoded_image) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
int image_size = delegate_->GetDesiredImageSideLength();
profile_picture_ = skia::ImageOperations::Resize(
decoded_image,
@@ -383,7 +383,7 @@ void ProfileDownloader::OnImageDecoded(const SkBitmap& decoded_image) {
}
void ProfileDownloader::OnDecodeImageFailed() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
delegate_->OnProfileDownloadFailure(
this, ProfileDownloaderDelegate::IMAGE_DECODE_FAILED);
}
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698