| OLD | NEW |
| 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/user_prefs/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" |
| 11 #include "content/public/browser/browser_context.h" | 11 #include "content/public/browser/browser_context.h" |
| 12 | 12 |
| 13 BrowserContextKeyedBaseFactory::BrowserContextKeyedBaseFactory( | 13 BrowserContextKeyedBaseFactory::BrowserContextKeyedBaseFactory( |
| 14 const char* name, | 14 const char* name, |
| 15 BrowserContextDependencyManager* manager) | 15 BrowserContextDependencyManager* manager) |
| 16 : dependency_manager_(manager) | 16 : dependency_manager_(manager) |
| 17 #ifndef NDEBUG | 17 #ifndef NDEBUG |
| 18 , | 18 , |
| 19 service_name_(name) | 19 service_name_(name) |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 bool BrowserContextKeyedBaseFactory::ArePreferencesSetOn( | 112 bool BrowserContextKeyedBaseFactory::ArePreferencesSetOn( |
| 113 content::BrowserContext* context) const { | 113 content::BrowserContext* 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 BrowserContextKeyedBaseFactory::MarkPreferencesSetOn( | 117 void BrowserContextKeyedBaseFactory::MarkPreferencesSetOn( |
| 118 content::BrowserContext* context) { | 118 content::BrowserContext* context) { |
| 119 DCHECK(!ArePreferencesSetOn(context)); | 119 DCHECK(!ArePreferencesSetOn(context)); |
| 120 registered_preferences_.insert(context); | 120 registered_preferences_.insert(context); |
| 121 } | 121 } |
| OLD | NEW |