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

Side by Side Diff: components/keyed_service/ios/refcounted_browser_state_keyed_service_factory.h

Issue 1090373003: Allow cross dependencies between BCKSF and BSKSF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove wrapper methods 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_KEYED_SERVICE_IOS_REFCOUNTED_BROWSER_STATE_KEYED_SERVICE_FACT ORY_H_ 5 #ifndef COMPONENTS_KEYED_SERVICE_IOS_REFCOUNTED_BROWSER_STATE_KEYED_SERVICE_FACT ORY_H_
6 #define COMPONENTS_KEYED_SERVICE_IOS_REFCOUNTED_BROWSER_STATE_KEYED_SERVICE_FACT ORY_H_ 6 #define COMPONENTS_KEYED_SERVICE_IOS_REFCOUNTED_BROWSER_STATE_KEYED_SERVICE_FACT ORY_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // services that it may be holding. 108 // services that it may be holding.
109 // 109 //
110 // Secondly, BrowserStateDestroyed() is called on every ServiceFactory 110 // Secondly, BrowserStateDestroyed() is called on every ServiceFactory
111 // and the default implementation removes it from |mapping_| and deletes 111 // and the default implementation removes it from |mapping_| and deletes
112 // the pointer. 112 // the pointer.
113 virtual void BrowserStateShutdown(web::BrowserState* context); 113 virtual void BrowserStateShutdown(web::BrowserState* context);
114 virtual void BrowserStateDestroyed(web::BrowserState* context); 114 virtual void BrowserStateDestroyed(web::BrowserState* context);
115 115
116 private: 116 private:
117 // Registers any user preferences on this service. This is called by 117 // Registers any user preferences on this service. This is called by
118 // RegisterProfilePrefsIfNecessary() and should be overriden by any service 118 // RegisterPrefsIfNecessaryForContext() and should be overriden by any service
119 // that wants to register profile-specific preferences. 119 // that wants to register profile-specific preferences.
120 virtual void RegisterProfilePrefs( 120 virtual void RegisterBrowserStatePrefs(
121 user_prefs::PrefRegistrySyncable* registry) {} 121 user_prefs::PrefRegistrySyncable* registry) {}
122 122
123 // RefcountedKeyedServiceFactory: 123 // RefcountedKeyedServiceFactory:
124 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( 124 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor(
125 base::SupportsUserData* context) const final; 125 base::SupportsUserData* context) const final;
126 bool IsOffTheRecord(base::SupportsUserData* context) const final; 126 bool IsOffTheRecord(base::SupportsUserData* context) const final;
127 127
128 // KeyedServiceBaseFactory: 128 // KeyedServiceBaseFactory:
129 user_prefs::PrefRegistrySyncable* GetAssociatedPrefRegistry( 129 #if defined(OS_IOS)
130 base::SupportsUserData* context) const final; 130 base::SupportsUserData* GetTypedContext(
131 base::SupportsUserData* context) const override;
132 base::SupportsUserData* GetContextForDependencyManager(
133 base::SupportsUserData* context) const override;
134 #endif // defined(OS_IOS)
131 base::SupportsUserData* GetContextToUse( 135 base::SupportsUserData* GetContextToUse(
132 base::SupportsUserData* context) const final; 136 base::SupportsUserData* context) const final;
133 bool ServiceIsCreatedWithContext() const final; 137 bool ServiceIsCreatedWithContext() const final;
134 void ContextShutdown(base::SupportsUserData* context) final; 138 void ContextShutdown(base::SupportsUserData* context) final;
135 void ContextDestroyed(base::SupportsUserData* context) final; 139 void ContextDestroyed(base::SupportsUserData* context) final;
136 void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) final; 140 void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) final;
137 141
138 DISALLOW_COPY_AND_ASSIGN(RefcountedBrowserStateKeyedServiceFactory); 142 DISALLOW_COPY_AND_ASSIGN(RefcountedBrowserStateKeyedServiceFactory);
139 }; 143 };
140 144
141 #endif // COMPONENTS_KEYED_SERVICE_IOS_REFCOUNTED_BROWSER_STATE_KEYED_SERVICE_F ACTORY_H_ 145 #endif // COMPONENTS_KEYED_SERVICE_IOS_REFCOUNTED_BROWSER_STATE_KEYED_SERVICE_F ACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698