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

Unified Diff: chrome/browser/profiles/profile_info_cache.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
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_info_cache.cc
diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc
index 583441d71cb1544d2c15491af406807a7ec1385c..3c7ba993ab91367031cd20f90ea2b4aa086a12bd 100644
--- a/chrome/browser/profiles/profile_info_cache.cc
+++ b/chrome/browser/profiles/profile_info_cache.cc
@@ -89,7 +89,7 @@ typedef std::vector<unsigned char> ImageData;
void SaveBitmap(scoped_ptr<ImageData> data,
const base::FilePath& image_path,
const base::Closure& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
// Make sure the destination directory exists.
base::FilePath dir = image_path.DirName();
@@ -112,7 +112,7 @@ void SaveBitmap(scoped_ptr<ImageData> data,
// will be NULL.
void ReadBitmap(const base::FilePath& image_path,
gfx::Image** out_image) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
*out_image = NULL;
// If the path doesn't exist, don't even try reading it.
@@ -137,13 +137,13 @@ void ReadBitmap(const base::FilePath& image_path,
void RunCallbackIfFileMissing(const base::FilePath& file_path,
const base::Closure& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
if (!base::PathExists(file_path))
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback);
}
void DeleteBitmap(const base::FilePath& image_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
base::DeleteFile(image_path, false);
}
@@ -1093,7 +1093,7 @@ const gfx::Image* ProfileInfoCache::LoadAvatarPictureFromPath(
void ProfileInfoCache::OnAvatarPictureLoaded(const base::FilePath& profile_path,
const std::string& key,
gfx::Image** image) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// TODO(erikchen): Remove ScopedTracker below once http://crbug.com/461175
// is fixed.
tracked_objects::ScopedTracker tracking_profile1(
@@ -1134,7 +1134,7 @@ void ProfileInfoCache::OnAvatarPictureLoaded(const base::FilePath& profile_path,
void ProfileInfoCache::OnAvatarPictureSaved(
const std::string& file_name,
const base::FilePath& profile_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
FOR_EACH_OBSERVER(ProfileInfoCacheObserver,
observer_list_,
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698