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

Unified Diff: chrome/browser/extensions/extension_storage_monitor.cc

Issue 1092963004: [chrome/browser/extensions] 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/extensions/extension_storage_monitor.cc
diff --git a/chrome/browser/extensions/extension_storage_monitor.cc b/chrome/browser/extensions/extension_storage_monitor.cc
index 654d843381b4e51ca90489247f2b01d11ac3c722..48f1ac2642ca91eb566e01632f57288c82f7b006 100644
--- a/chrome/browser/extensions/extension_storage_monitor.cc
+++ b/chrome/browser/extensions/extension_storage_monitor.cc
@@ -122,7 +122,7 @@ class StorageEventObserver
int64 next_threshold,
const base::TimeDelta& rate,
bool should_uma) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(quota_manager.get());
GURL origin = site_url.GetOrigin();
@@ -147,7 +147,7 @@ class StorageEventObserver
// Updates the threshold for an extension already being monitored.
void UpdateThresholdForExtension(const std::string& extension_id,
int64 next_threshold) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
for (OriginStorageStateMap::iterator it = origin_state_map_.begin();
it != origin_state_map_.end();
@@ -161,7 +161,7 @@ class StorageEventObserver
// Deregister as an observer for the extension's storage events.
void StopObservingForExtension(const std::string& extension_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
for (OriginStorageStateMap::iterator it = origin_state_map_.begin();
it != origin_state_map_.end(); ) {
@@ -186,7 +186,7 @@ class StorageEventObserver
// Stop observing all storage events. Called during shutdown.
void StopObserving() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
for (OriginStorageStateMap::iterator it = origin_state_map_.begin();
it != origin_state_map_.end(); ++it) {
@@ -401,7 +401,7 @@ void ExtensionStorageMonitor::OnStorageThresholdExceeded(
const std::string& extension_id,
int64 next_threshold,
int64 current_usage) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
const Extension* extension = GetExtensionById(context_, extension_id);
if (!extension)
« no previous file with comments | « chrome/browser/extensions/extension_gcm_app_handler_unittest.cc ('k') | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698