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

Unified Diff: chrome/browser/extensions/api/declarative/rules_cache_delegate.cc

Issue 216513002: Replace DCHECK(BrowserThread::CurrentlyOn) with DCHECK_CURRENTLY_ON in extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/extensions/api/declarative/rules_cache_delegate.cc
diff --git a/chrome/browser/extensions/api/declarative/rules_cache_delegate.cc b/chrome/browser/extensions/api/declarative/rules_cache_delegate.cc
index d4bfcc66a90a7ec913b1cd979ab3081513e6ec07..78de68a048f90b7a15bcb510b12dc16dd7c9077a 100644
--- a/chrome/browser/extensions/api/declarative/rules_cache_delegate.cc
+++ b/chrome/browser/extensions/api/declarative/rules_cache_delegate.cc
@@ -60,7 +60,7 @@ std::string RulesCacheDelegate::GetRulesStoredKey(const std::string& event_name,
// 2. does not create scoped_refptr holding the registry. (A short-lived
// scoped_refptr might delete the rules registry before it is constructed.)
void RulesCacheDelegate::Init(RulesRegistry* registry) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
// WARNING: The first use of |registry_| will bind it to the calling thread
// so don't use this here.
@@ -93,7 +93,7 @@ void RulesCacheDelegate::Init(RulesRegistry* registry) {
void RulesCacheDelegate::WriteToStorage(const std::string& extension_id,
scoped_ptr<base::Value> value) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (!profile_)
return;
@@ -111,7 +111,7 @@ void RulesCacheDelegate::WriteToStorage(const std::string& extension_id,
}
void RulesCacheDelegate::CheckIfReady() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (notified_registry_ || !waiting_for_extensions_.empty())
return;
@@ -148,7 +148,7 @@ void RulesCacheDelegate::ReadRulesForInstalledExtensions() {
}
void RulesCacheDelegate::ReadFromStorage(const std::string& extension_id) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (!profile_)
return;
@@ -177,7 +177,7 @@ void RulesCacheDelegate::ReadFromStorage(const std::string& extension_id) {
void RulesCacheDelegate::ReadFromStorageCallback(
const std::string& extension_id,
scoped_ptr<base::Value> value) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
content::BrowserThread::PostTask(
rules_registry_thread_,
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698