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

Side by Side Diff: components/keyed_service/content/browser_context_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_CONTENT_BROWSER_CONTEXT_KEYED_SERVICE_FACTORY_H _ 5 #ifndef COMPONENTS_KEYED_SERVICE_CONTENT_BROWSER_CONTEXT_KEYED_SERVICE_FACTORY_H _
6 #define COMPONENTS_KEYED_SERVICE_CONTENT_BROWSER_CONTEXT_KEYED_SERVICE_FACTORY_H _ 6 #define COMPONENTS_KEYED_SERVICE_CONTENT_BROWSER_CONTEXT_KEYED_SERVICE_FACTORY_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 "components/keyed_service/core/keyed_service_export.h" 10 #include "components/keyed_service/core/keyed_service_export.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Secondly, BrowserContextDestroyed() is called on every ServiceFactory 117 // Secondly, BrowserContextDestroyed() is called on every ServiceFactory
118 // and the default implementation removes it from |mapping_| and deletes 118 // and the default implementation removes it from |mapping_| and deletes
119 // the pointer. 119 // the pointer.
120 virtual void BrowserContextShutdown(content::BrowserContext* context); 120 virtual void BrowserContextShutdown(content::BrowserContext* context);
121 virtual void BrowserContextDestroyed(content::BrowserContext* context); 121 virtual void BrowserContextDestroyed(content::BrowserContext* context);
122 122
123 private: 123 private:
124 friend class BrowserContextDependencyManagerUnittests; 124 friend class BrowserContextDependencyManagerUnittests;
125 125
126 // Registers any user preferences on this service. This is called by 126 // Registers any user preferences on this service. This is called by
127 // RegisterProfilePrefsIfNecessary() and should be overriden by any service 127 // RegisterPrefsIfNecessaryForContext() and should be overriden by any service
128 // that wants to register profile-specific preferences. 128 // that wants to register profile-specific preferences.
129 virtual void RegisterProfilePrefs( 129 virtual void RegisterProfilePrefs(
130 user_prefs::PrefRegistrySyncable* registry) {} 130 user_prefs::PrefRegistrySyncable* registry) {}
131 131
132 // KeyedServiceFactory: 132 // KeyedServiceFactory:
133 KeyedService* BuildServiceInstanceFor( 133 KeyedService* BuildServiceInstanceFor(
134 base::SupportsUserData* context) const final; 134 base::SupportsUserData* context) const final;
135 bool IsOffTheRecord(base::SupportsUserData* context) const final; 135 bool IsOffTheRecord(base::SupportsUserData* context) const final;
136 136
137 // KeyedServiceBaseFactory: 137 // KeyedServiceBaseFactory:
138 user_prefs::PrefRegistrySyncable* GetAssociatedPrefRegistry(
139 base::SupportsUserData* context) const final;
140 base::SupportsUserData* GetContextToUse( 138 base::SupportsUserData* GetContextToUse(
141 base::SupportsUserData* context) const final; 139 base::SupportsUserData* context) const final;
142 bool ServiceIsCreatedWithContext() const final; 140 bool ServiceIsCreatedWithContext() const final;
143 void ContextShutdown(base::SupportsUserData* context) final; 141 void ContextShutdown(base::SupportsUserData* context) final;
144 void ContextDestroyed(base::SupportsUserData* context) final; 142 void ContextDestroyed(base::SupportsUserData* context) final;
145 void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) final; 143 void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) final;
146 144
147 DISALLOW_COPY_AND_ASSIGN(BrowserContextKeyedServiceFactory); 145 DISALLOW_COPY_AND_ASSIGN(BrowserContextKeyedServiceFactory);
148 }; 146 };
149 147
150 #endif // COMPONENTS_KEYED_SERVICE_CONTENT_BROWSER_CONTEXT_KEYED_SERVICE_FACTOR Y_H_ 148 #endif // COMPONENTS_KEYED_SERVICE_CONTENT_BROWSER_CONTEXT_KEYED_SERVICE_FACTOR Y_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698