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

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

Issue 1062083003: Implement BrowserStateKeyedServiceFactory::GetAssociatedPrefRegistry() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing include in card_unmask_prompt_controller_impl_unittest.cc 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/refcounted_browser_context_keyed_serv ice_factory.h" 5 #include "components/keyed_service/content/refcounted_browser_context_keyed_serv ice_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 #include "components/keyed_service/core/refcounted_keyed_service.h" 10 #include "components/keyed_service/core/refcounted_keyed_service.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 99
100 bool RefcountedBrowserContextKeyedServiceFactory::IsOffTheRecord( 100 bool RefcountedBrowserContextKeyedServiceFactory::IsOffTheRecord(
101 base::SupportsUserData* context) const { 101 base::SupportsUserData* context) const {
102 return static_cast<content::BrowserContext*>(context)->IsOffTheRecord(); 102 return static_cast<content::BrowserContext*>(context)->IsOffTheRecord();
103 } 103 }
104 104
105 user_prefs::PrefRegistrySyncable* 105 user_prefs::PrefRegistrySyncable*
106 RefcountedBrowserContextKeyedServiceFactory::GetAssociatedPrefRegistry( 106 RefcountedBrowserContextKeyedServiceFactory::GetAssociatedPrefRegistry(
107 base::SupportsUserData* context) const { 107 base::SupportsUserData* context) const {
108 PrefService* prefs = user_prefs::UserPrefs::Get( 108 PrefService* prefs = user_prefs::UserPrefs::Get(context);
109 static_cast<content::BrowserContext*>(context));
110 user_prefs::PrefRegistrySyncable* registry = 109 user_prefs::PrefRegistrySyncable* registry =
111 static_cast<user_prefs::PrefRegistrySyncable*>( 110 static_cast<user_prefs::PrefRegistrySyncable*>(
112 prefs->DeprecatedGetPrefRegistry()); 111 prefs->DeprecatedGetPrefRegistry());
113 return registry; 112 return registry;
114 } 113 }
115 114
116 base::SupportsUserData* 115 base::SupportsUserData*
117 RefcountedBrowserContextKeyedServiceFactory::GetContextToUse( 116 RefcountedBrowserContextKeyedServiceFactory::GetContextToUse(
118 base::SupportsUserData* context) const { 117 base::SupportsUserData* context) const {
119 return GetBrowserContextToUse(static_cast<content::BrowserContext*>(context)); 118 return GetBrowserContextToUse(static_cast<content::BrowserContext*>(context));
(...skipping 11 matching lines...) Expand all
131 130
132 void RefcountedBrowserContextKeyedServiceFactory::ContextDestroyed( 131 void RefcountedBrowserContextKeyedServiceFactory::ContextDestroyed(
133 base::SupportsUserData* context) { 132 base::SupportsUserData* context) {
134 BrowserContextDestroyed(static_cast<content::BrowserContext*>(context)); 133 BrowserContextDestroyed(static_cast<content::BrowserContext*>(context));
135 } 134 }
136 135
137 void RefcountedBrowserContextKeyedServiceFactory::RegisterPrefs( 136 void RefcountedBrowserContextKeyedServiceFactory::RegisterPrefs(
138 user_prefs::PrefRegistrySyncable* registry) { 137 user_prefs::PrefRegistrySyncable* registry) {
139 RegisterProfilePrefs(registry); 138 RegisterProfilePrefs(registry);
140 } 139 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698