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

Unified Diff: components/keyed_service/content/browser_context_keyed_base_factory.cc

Issue 2775753002: Restore thread check in KeyedService factories.
Patch Set: Created 3 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 | « no previous file | components/keyed_service/content/browser_context_keyed_service_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/keyed_service/content/browser_context_keyed_base_factory.cc
diff --git a/components/keyed_service/content/browser_context_keyed_base_factory.cc b/components/keyed_service/content/browser_context_keyed_base_factory.cc
index 7c2d8b797c54c8592e6685996e1bb26ec5e710d4..7e3ab94e069f33537e9c020ce287562c7e90c520 100644
--- a/components/keyed_service/content/browser_context_keyed_base_factory.cc
+++ b/components/keyed_service/content/browser_context_keyed_base_factory.cc
@@ -18,9 +18,6 @@ BrowserContextKeyedBaseFactory::~BrowserContextKeyedBaseFactory() {
content::BrowserContext* BrowserContextKeyedBaseFactory::GetBrowserContextToUse(
content::BrowserContext* context) const {
- // TODO(crbug.com/701326): This DCHECK should be moved to GetContextToUse().
- DCHECK(CalledOnValidThread());
-
// Safe default for the Incognito mode: no service.
if (context->IsOffTheRecord())
return NULL;
@@ -49,6 +46,7 @@ void BrowserContextKeyedBaseFactory::BrowserContextDestroyed(
base::SupportsUserData* BrowserContextKeyedBaseFactory::GetContextToUse(
base::SupportsUserData* context) const {
+ DCHECK(CalledOnValidThread());
AssertContextWasntDestroyed(context);
return GetBrowserContextToUse(static_cast<content::BrowserContext*>(context));
}
« no previous file with comments | « no previous file | components/keyed_service/content/browser_context_keyed_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698