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

Unified Diff: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc

Issue 1036723003: favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/chromeos/login/users/wallpaper/wallpaper_manager.cc
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
index 9faaa9725912bfa33e1498272a5077c2a39d7fe9..570bf99aa0712c2d7fc32283d46276f0b235353f 100644
--- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
@@ -192,7 +192,7 @@ class WallpaperManager::PendingWallpaper :
// This method is usually triggered by timer to actually load request.
void ProcessRequest() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
timer.Stop(); // Erase reference to self.
@@ -231,7 +231,7 @@ class WallpaperManager::PendingWallpaper :
// This method is called by callback, when load request is finished.
void OnWallpaperSet() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// The only known case for this check to fail is global destruction during
// wallpaper load. It should never happen.
@@ -303,7 +303,7 @@ void WallpaperManager::Shutdown() {
WallpaperManager::WallpaperResolution
WallpaperManager::GetAppropriateResolution() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
gfx::Size size =
ash::DesktopBackgroundController::GetMaxDisplaySizeInNative();
return (size.width() > wallpaper::kSmallWallpaperMaxWidth ||
@@ -339,7 +339,7 @@ void WallpaperManager::EnsureLoggedInUserWallpaperLoaded() {
}
void WallpaperManager::InitializeWallpaper() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
user_manager::UserManager* user_manager = user_manager::UserManager::Get();
// Apply device customization.
@@ -384,7 +384,7 @@ void WallpaperManager::InitializeWallpaper() {
void WallpaperManager::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
switch (type) {
case chrome::NOTIFICATION_LOGIN_USER_CHANGED: {
ClearDisposableWallpaperCache();
@@ -457,7 +457,7 @@ void WallpaperManager::SetCustomWallpaper(
user_manager::User::WallpaperType type,
const gfx::ImageSkia& image,
bool update_wallpaper) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// There is no visible background in kiosk mode.
if (user_manager::UserManager::Get()->IsLoggedInAsKioskApp())
@@ -596,7 +596,7 @@ void WallpaperManager::DoSetDefaultWallpaper(
void WallpaperManager::SetUserWallpaperInfo(const std::string& user_id,
const WallpaperInfo& info,
bool is_persistent) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
current_user_wallpaper_info_ = info;
if (!is_persistent)
return;
@@ -616,7 +616,7 @@ void WallpaperManager::SetUserWallpaperInfo(const std::string& user_id,
void WallpaperManager::ScheduleSetUserWallpaper(const std::string& user_id,
bool delayed) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Some unit tests come here without a UserManager or without a pref system.q
if (!user_manager::UserManager::IsInitialized() ||
!g_browser_process->local_state()) {
@@ -818,7 +818,7 @@ void WallpaperManager::InitializeRegisteredDeviceWallpaper() {
bool WallpaperManager::GetUserWallpaperInfo(const std::string& user_id,
WallpaperInfo* info) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (user_manager::UserManager::Get()->IsUserNonCryptohomeDataEphemeral(
user_id)) {
@@ -867,7 +867,7 @@ void WallpaperManager::OnWallpaperDecoded(
bool update_wallpaper,
MovableOnDestroyCallbackHolder on_finish,
const user_manager::UserImage& user_image) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
TRACE_EVENT_ASYNC_END0("ui", "LoadAndDecodeWallpaper", this);
// If decoded wallpaper is empty, we have probably failed to decode the file.
@@ -900,7 +900,7 @@ void WallpaperManager::StartLoad(const std::string& user_id,
bool update_wallpaper,
const base::FilePath& wallpaper_path,
MovableOnDestroyCallbackHolder on_finish) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
TRACE_EVENT_ASYNC_BEGIN0("ui", "LoadAndDecodeWallpaper", this);
if (update_wallpaper) {
// We are now about to change the wallpaper, so update the path and remove
@@ -952,7 +952,7 @@ void WallpaperManager::OnCustomizedDefaultWallpaperResized(
scoped_ptr<bool> success,
scoped_ptr<gfx::ImageSkia> small_wallpaper_image,
scoped_ptr<gfx::ImageSkia> large_wallpaper_image) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(rescaled_files);
DCHECK(success.get());
if (!*success) {

Powered by Google App Engine
This is Rietveld 408576698