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

Unified Diff: components/keyed_service/ios/refcounted_browser_state_keyed_service_factory.cc

Issue 1090373003: Allow cross dependencies between BCKSF and BSKSF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix dependencies and DCHECK in Get{Original,Underlying}ContextInternal 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: 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 26828c021224a55ca892579922f4efe0c0110ef0..aa0d6c4f1eb35e49958465453026659cdcdc96f7 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
@@ -86,25 +86,30 @@ void RefcountedBrowserStateKeyedServiceFactory::BrowserStateDestroyed(
scoped_refptr<RefcountedKeyedService>
RefcountedBrowserStateKeyedServiceFactory::BuildServiceInstanceFor(
base::SupportsUserData* context) const {
- return BuildServiceInstanceFor(BrowserStateFromContext(context));
+ return BuildServiceInstanceFor(UnderlyingContextFromContext(context));
}
bool RefcountedBrowserStateKeyedServiceFactory::IsOffTheRecord(
base::SupportsUserData* context) const {
- return BrowserStateFromContext(context)->IsOffTheRecord();
+ return UnderlyingContextFromContext(context)->IsOffTheRecord();
}
-user_prefs::PrefRegistrySyncable*
-RefcountedBrowserStateKeyedServiceFactory::GetAssociatedPrefRegistry(
+base::SupportsUserData*
+RefcountedBrowserStateKeyedServiceFactory::GetUnderlyingContextInternal(
+ base::SupportsUserData* context) const {
+ return UnderlyingContextFromContext(context);
+}
+
+base::SupportsUserData*
+RefcountedBrowserStateKeyedServiceFactory::GetOriginalContextInternal(
base::SupportsUserData* context) const {
- NOTREACHED();
- return nullptr;
+ return OriginalContextFromContext(context);
}
base::SupportsUserData*
RefcountedBrowserStateKeyedServiceFactory::GetContextToUse(
base::SupportsUserData* context) const {
- return GetBrowserStateToUse(BrowserStateFromContext(context));
+ return GetBrowserStateToUse(UnderlyingContextFromContext(context));
}
bool RefcountedBrowserStateKeyedServiceFactory::ServiceIsCreatedWithContext()
@@ -114,15 +119,15 @@ bool RefcountedBrowserStateKeyedServiceFactory::ServiceIsCreatedWithContext()
void RefcountedBrowserStateKeyedServiceFactory::ContextShutdown(
base::SupportsUserData* context) {
- BrowserStateShutdown(BrowserStateFromContext(context));
+ BrowserStateShutdown(UnderlyingContextFromContext(context));
}
void RefcountedBrowserStateKeyedServiceFactory::ContextDestroyed(
base::SupportsUserData* context) {
- BrowserStateDestroyed(BrowserStateFromContext(context));
+ BrowserStateDestroyed(UnderlyingContextFromContext(context));
}
void RefcountedBrowserStateKeyedServiceFactory::RegisterPrefs(
user_prefs::PrefRegistrySyncable* registry) {
- RegisterProfilePrefs(registry);
+ RegisterBrowserStatePrefs(registry);
}

Powered by Google App Engine
This is Rietveld 408576698