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

Side by Side Diff: components/keyed_service/content/browser_context_keyed_base_factory.cc

Issue 1062083003: Implement BrowserStateKeyedServiceFactory::GetAssociatedPrefRegistry() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 #include "components/keyed_service/content/browser_context_keyed_base_factory.h" 5 #include "components/keyed_service/content/browser_context_keyed_base_factory.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h" 8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
9 #include "components/pref_registry/pref_registry_syncable.h" 9 #include "components/pref_registry/pref_registry_syncable.h"
10 #include "components/user_prefs/user_prefs.h" 10 #include "components/user_prefs/user_prefs.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 void BrowserContextKeyedBaseFactory::BrowserContextDestroyed( 51 void BrowserContextKeyedBaseFactory::BrowserContextDestroyed(
52 content::BrowserContext* context) { 52 content::BrowserContext* context) {
53 KeyedServiceBaseFactory::ContextDestroyed(context); 53 KeyedServiceBaseFactory::ContextDestroyed(context);
54 } 54 }
55 55
56 user_prefs::PrefRegistrySyncable* 56 user_prefs::PrefRegistrySyncable*
57 BrowserContextKeyedBaseFactory::GetAssociatedPrefRegistry( 57 BrowserContextKeyedBaseFactory::GetAssociatedPrefRegistry(
58 base::SupportsUserData* context) const { 58 base::SupportsUserData* context) const {
59 PrefService* prefs = user_prefs::UserPrefs::Get( 59 PrefService* prefs = user_prefs::UserPrefs::Get(
sdefresne 2015/04/15 15:14:31 style plus compilation fix: PrefService* prefs =
droger 2015/04/15 15:18:37 Done.
60 static_cast<content::BrowserContext*>(context)); 60 context));
61 user_prefs::PrefRegistrySyncable* registry = 61 user_prefs::PrefRegistrySyncable* registry =
62 static_cast<user_prefs::PrefRegistrySyncable*>( 62 static_cast<user_prefs::PrefRegistrySyncable*>(
63 prefs->DeprecatedGetPrefRegistry()); 63 prefs->DeprecatedGetPrefRegistry());
64 return registry; 64 return registry;
65 } 65 }
66 66
67 base::SupportsUserData* BrowserContextKeyedBaseFactory::GetContextToUse( 67 base::SupportsUserData* BrowserContextKeyedBaseFactory::GetContextToUse(
68 base::SupportsUserData* context) const { 68 base::SupportsUserData* context) const {
69 return GetBrowserContextToUse(static_cast<content::BrowserContext*>(context)); 69 return GetBrowserContextToUse(static_cast<content::BrowserContext*>(context));
70 } 70 }
(...skipping 24 matching lines...) Expand all
95 95
96 bool BrowserContextKeyedBaseFactory::HasTestingFactory( 96 bool BrowserContextKeyedBaseFactory::HasTestingFactory(
97 base::SupportsUserData* context) { 97 base::SupportsUserData* context) {
98 return HasTestingFactory(static_cast<content::BrowserContext*>(context)); 98 return HasTestingFactory(static_cast<content::BrowserContext*>(context));
99 } 99 }
100 100
101 void BrowserContextKeyedBaseFactory::CreateServiceNow( 101 void BrowserContextKeyedBaseFactory::CreateServiceNow(
102 base::SupportsUserData* context) { 102 base::SupportsUserData* context) {
103 CreateServiceNow(static_cast<content::BrowserContext*>(context)); 103 CreateServiceNow(static_cast<content::BrowserContext*>(context));
104 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698