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

Unified Diff: components/keyed_service/ios/refcounted_browser_state_keyed_service_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 | « components/keyed_service/ios/browser_state_keyed_service_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/keyed_service/ios/refcounted_browser_state_keyed_service_factory.cc
diff --git a/components/keyed_service/ios/refcounted_browser_state_keyed_service_factory.cc b/components/keyed_service/ios/refcounted_browser_state_keyed_service_factory.cc
index a9abd88e52634595edea81c6bbdb366872c250e8..f4a6d68f61d9958c3cb01d0e1d6d4a08f6ec983c 100644
--- a/components/keyed_service/ios/refcounted_browser_state_keyed_service_factory.cc
+++ b/components/keyed_service/ios/refcounted_browser_state_keyed_service_factory.cc
@@ -49,9 +49,6 @@ RefcountedBrowserStateKeyedServiceFactory::GetServiceForBrowserState(
web::BrowserState*
RefcountedBrowserStateKeyedServiceFactory::GetBrowserStateToUse(
web::BrowserState* context) const {
- // TODO(crbug.com/701326): This DCHECK should be moved to GetContextToUse().
- DCHECK(CalledOnValidThread());
-
// Safe default for Incognito mode: no service.
if (context->IsOffTheRecord())
return nullptr;
@@ -93,6 +90,7 @@ bool RefcountedBrowserStateKeyedServiceFactory::IsOffTheRecord(
base::SupportsUserData*
RefcountedBrowserStateKeyedServiceFactory::GetContextToUse(
base::SupportsUserData* context) const {
+ DCHECK(CalledOnValidThread());
AssertContextWasntDestroyed(context);
return GetBrowserStateToUse(static_cast<web::BrowserState*>(context));
}
« no previous file with comments | « components/keyed_service/ios/browser_state_keyed_service_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698