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

Side by Side Diff: components/keyed_service/content/refcounted_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_REFCOUNTED_BROWSER_CONTEXT_KEYED_SERVIC E_FACTORY_H_ 5 #ifndef COMPONENTS_KEYED_SERVICE_CONTENT_REFCOUNTED_BROWSER_CONTEXT_KEYED_SERVIC E_FACTORY_H_
6 #define COMPONENTS_KEYED_SERVICE_CONTENT_REFCOUNTED_BROWSER_CONTEXT_KEYED_SERVIC E_FACTORY_H_ 6 #define COMPONENTS_KEYED_SERVICE_CONTENT_REFCOUNTED_BROWSER_CONTEXT_KEYED_SERVIC E_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 "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // Secondly, BrowserContextDestroyed() is called on every ServiceFactory 123 // Secondly, BrowserContextDestroyed() is called on every ServiceFactory
124 // and the default implementation removes it from |mapping_| and deletes 124 // and the default implementation removes it from |mapping_| and deletes
125 // the pointer. 125 // the pointer.
126 virtual void BrowserContextShutdown(content::BrowserContext* context); 126 virtual void BrowserContextShutdown(content::BrowserContext* context);
127 virtual void BrowserContextDestroyed(content::BrowserContext* context); 127 virtual void BrowserContextDestroyed(content::BrowserContext* context);
128 128
129 private: 129 private:
130 friend class BrowserContextDependencyManagerUnittests; 130 friend class BrowserContextDependencyManagerUnittests;
131 131
132 // Registers any user preferences on this service. This is called by 132 // Registers any user preferences on this service. This is called by
133 // RegisterProfilePrefsIfNecessary() and should be overriden by any service 133 // RegisterPrefsIfNecessaryForContext() and should be overriden by any service
134 // that wants to register profile-specific preferences. 134 // that wants to register profile-specific preferences.
135 virtual void RegisterProfilePrefs( 135 virtual void RegisterProfilePrefs(
136 user_prefs::PrefRegistrySyncable* registry) {} 136 user_prefs::PrefRegistrySyncable* registry) {}
137 137
138 // RefcountedKeyedServiceFactory: 138 // RefcountedKeyedServiceFactory:
139 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( 139 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor(
140 base::SupportsUserData* context) const final; 140 base::SupportsUserData* context) const final;
141 bool IsOffTheRecord(base::SupportsUserData* context) const final; 141 bool IsOffTheRecord(base::SupportsUserData* context) const final;
142 142
143 // KeyedServiceBaseFactory: 143 // KeyedServiceBaseFactory:
144 user_prefs::PrefRegistrySyncable* GetAssociatedPrefRegistry(
145 base::SupportsUserData* context) const final;
146 base::SupportsUserData* GetContextToUse( 144 base::SupportsUserData* GetContextToUse(
147 base::SupportsUserData* context) const final; 145 base::SupportsUserData* context) const final;
148 bool ServiceIsCreatedWithContext() const final; 146 bool ServiceIsCreatedWithContext() const final;
149 void ContextShutdown(base::SupportsUserData* context) final; 147 void ContextShutdown(base::SupportsUserData* context) final;
150 void ContextDestroyed(base::SupportsUserData* context) final; 148 void ContextDestroyed(base::SupportsUserData* context) final;
151 void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) final; 149 void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) final;
152 150
153 DISALLOW_COPY_AND_ASSIGN(RefcountedBrowserContextKeyedServiceFactory); 151 DISALLOW_COPY_AND_ASSIGN(RefcountedBrowserContextKeyedServiceFactory);
154 }; 152 };
155 153
156 #endif // COMPONENTS_KEYED_SERVICE_CONTENT_REFCOUNTED_BROWSER_CONTEXT_KEYED_SER VICE_FACTORY_H_ 154 #endif // COMPONENTS_KEYED_SERVICE_CONTENT_REFCOUNTED_BROWSER_CONTEXT_KEYED_SER VICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698