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

Unified Diff: extensions/browser/api/api_resource_manager.h

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
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | extensions/browser/api/async_api_function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/api_resource_manager.h
diff --git a/extensions/browser/api/api_resource_manager.h b/extensions/browser/api/api_resource_manager.h
index a3c774062cae3fc5a47104a4f9497aaec212c180..6374abec0e055f3f87748c08781b4da2326b6ad4 100644
--- a/extensions/browser/api/api_resource_manager.h
+++ b/extensions/browser/api/api_resource_manager.h
@@ -176,7 +176,7 @@ class ApiResourceManager : public BrowserContextKeyedAPI,
: next_id_(1), thread_id_(thread_id) {}
int Add(T* api_resource) {
- DCHECK(content::BrowserThread::CurrentlyOn(thread_id_));
+ DCHECK_CURRENTLY_ON(thread_id_);
int id = GenerateId();
if (id > 0) {
linked_ptr<T> resource_ptr(api_resource);
@@ -195,7 +195,7 @@ class ApiResourceManager : public BrowserContextKeyedAPI,
}
void Remove(const std::string& extension_id, int api_resource_id) {
- DCHECK(content::BrowserThread::CurrentlyOn(thread_id_));
+ DCHECK_CURRENTLY_ON(thread_id_);
if (GetOwnedResource(extension_id, api_resource_id) != NULL) {
DCHECK(extension_resource_map_.find(extension_id) !=
extension_resource_map_.end());
@@ -205,12 +205,12 @@ class ApiResourceManager : public BrowserContextKeyedAPI,
}
T* Get(const std::string& extension_id, int api_resource_id) {
- DCHECK(content::BrowserThread::CurrentlyOn(thread_id_));
+ DCHECK_CURRENTLY_ON(thread_id_);
return GetOwnedResource(extension_id, api_resource_id);
}
base::hash_set<int>* GetResourceIds(const std::string& extension_id) {
- DCHECK(content::BrowserThread::CurrentlyOn(thread_id_));
+ DCHECK_CURRENTLY_ON(thread_id_);
return GetOwnedResourceIds(extension_id);
}
@@ -251,7 +251,7 @@ class ApiResourceManager : public BrowserContextKeyedAPI,
}
base::hash_set<int>* GetOwnedResourceIds(const std::string& extension_id) {
- DCHECK(content::BrowserThread::CurrentlyOn(thread_id_));
+ DCHECK_CURRENTLY_ON(thread_id_);
if (extension_resource_map_.find(extension_id) ==
extension_resource_map_.end())
return NULL;
@@ -271,7 +271,7 @@ class ApiResourceManager : public BrowserContextKeyedAPI,
void CleanupResourcesFromExtension(const std::string& extension_id,
bool remove_all) {
- DCHECK(content::BrowserThread::CurrentlyOn(thread_id_));
+ DCHECK_CURRENTLY_ON(thread_id_);
if (extension_resource_map_.find(extension_id) ==
extension_resource_map_.end()) {
@@ -307,7 +307,7 @@ class ApiResourceManager : public BrowserContextKeyedAPI,
}
void Cleanup() {
- DCHECK(content::BrowserThread::CurrentlyOn(thread_id_));
+ DCHECK_CURRENTLY_ON(thread_id_);
api_resource_map_.clear();
extension_resource_map_.clear();
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | extensions/browser/api/async_api_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698