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

Unified Diff: chrome/browser/chromeos/customization/customization_wallpaper_downloader.cc

Issue 1049873005: [chrome/browser/chromeos/] 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
« no previous file with comments | « chrome/browser/chromeos/base/locale_util.cc ('k') | chrome/browser/chromeos/drive/file_task_executor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/customization/customization_wallpaper_downloader.cc
diff --git a/chrome/browser/chromeos/customization/customization_wallpaper_downloader.cc b/chrome/browser/chromeos/customization/customization_wallpaper_downloader.cc
index 8e09a5ab57d3f223d24386101aa550edfa06663a..3213831d74a059084a7929cba9c70092a31a9b3d 100644
--- a/chrome/browser/chromeos/customization/customization_wallpaper_downloader.cc
+++ b/chrome/browser/chromeos/customization/customization_wallpaper_downloader.cc
@@ -75,15 +75,15 @@ CustomizationWallpaperDownloader::CustomizationWallpaperDownloader(
retry_delay_(base::TimeDelta::FromSeconds(kRetrySleepSeconds)),
on_wallpaper_fetch_completed_(on_wallpaper_fetch_completed),
weak_factory_(this) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
}
CustomizationWallpaperDownloader::~CustomizationWallpaperDownloader() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
}
void CustomizationWallpaperDownloader::StartRequest() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(wallpaper_url_.is_valid());
url_fetcher_.reset(
@@ -103,7 +103,7 @@ void CustomizationWallpaperDownloader::StartRequest() {
}
void CustomizationWallpaperDownloader::Retry() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
++retries_;
const double delay_seconds = std::min(
@@ -119,7 +119,7 @@ void CustomizationWallpaperDownloader::Retry() {
}
void CustomizationWallpaperDownloader::Start() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
scoped_ptr<bool> success(new bool(false));
base::Closure mkdir_closure = base::Bind(&CreateWallpaperDirectory,
@@ -137,14 +137,14 @@ void CustomizationWallpaperDownloader::Start() {
void CustomizationWallpaperDownloader::OnWallpaperDirectoryCreated(
scoped_ptr<bool> success) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (*success)
StartRequest();
}
void CustomizationWallpaperDownloader::OnURLFetchComplete(
const net::URLFetcher* source) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK_EQ(url_fetcher_.get(), source);
const net::URLRequestStatus status = source->GetStatus();
@@ -188,7 +188,7 @@ void CustomizationWallpaperDownloader::OnURLFetchComplete(
void CustomizationWallpaperDownloader::OnTemporaryFileRenamed(
scoped_ptr<bool> success) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
on_wallpaper_fetch_completed_.Run(*success, wallpaper_url_);
}
« no previous file with comments | « chrome/browser/chromeos/base/locale_util.cc ('k') | chrome/browser/chromeos/drive/file_task_executor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698