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

Side by Side Diff: components/keyed_service/core/keyed_service_base_factory.cc

Issue 1662843002: Revert of Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « components/keyed_service/DEPS ('k') | components/metrics/clean_exit_beacon.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/core/keyed_service_base_factory.h" 5 #include "components/keyed_service/core/keyed_service_base_factory.h"
6 6
7 #include "base/prefs/pref_service.h"
7 #include "base/supports_user_data.h" 8 #include "base/supports_user_data.h"
8 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
9 #include "components/keyed_service/core/dependency_manager.h" 10 #include "components/keyed_service/core/dependency_manager.h"
10 #include "components/pref_registry/pref_registry_syncable.h" 11 #include "components/pref_registry/pref_registry_syncable.h"
11 #include "components/prefs/pref_service.h"
12 #include "components/user_prefs/user_prefs.h" 12 #include "components/user_prefs/user_prefs.h"
13 13
14 void KeyedServiceBaseFactory::RegisterUserPrefsOnContextForTest( 14 void KeyedServiceBaseFactory::RegisterUserPrefsOnContextForTest(
15 base::SupportsUserData* context) { 15 base::SupportsUserData* context) {
16 TRACE_EVENT0("browser,startup", 16 TRACE_EVENT0("browser,startup",
17 "KeyedServiceBaseFactory::RegisterUserPrefsOnContextForTest"); 17 "KeyedServiceBaseFactory::RegisterUserPrefsOnContextForTest");
18 // Safe timing for pref registration is hard. Previously, we made 18 // Safe timing for pref registration is hard. Previously, we made
19 // context responsible for all pref registration on every service 19 // context responsible for all pref registration on every service
20 // that used contexts. Now we don't and there are timing issues. 20 // that used contexts. Now we don't and there are timing issues.
21 // 21 //
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 bool KeyedServiceBaseFactory::ArePreferencesSetOn( 112 bool KeyedServiceBaseFactory::ArePreferencesSetOn(
113 base::SupportsUserData* context) const { 113 base::SupportsUserData* context) const {
114 return registered_preferences_.find(context) != registered_preferences_.end(); 114 return registered_preferences_.find(context) != registered_preferences_.end();
115 } 115 }
116 116
117 void KeyedServiceBaseFactory::MarkPreferencesSetOn( 117 void KeyedServiceBaseFactory::MarkPreferencesSetOn(
118 base::SupportsUserData* context) { 118 base::SupportsUserData* context) {
119 DCHECK(!ArePreferencesSetOn(context)); 119 DCHECK(!ArePreferencesSetOn(context));
120 registered_preferences_.insert(context); 120 registered_preferences_.insert(context);
121 } 121 }
OLDNEW
« no previous file with comments | « components/keyed_service/DEPS ('k') | components/metrics/clean_exit_beacon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698