OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/chromeos/policy/policy_cert_service_factory.h" | 5 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" |
6 | 6 |
7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
8 #include "base/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/prefs/scoped_user_pref_update.h" | 10 #include "base/prefs/scoped_user_pref_update.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 content::BrowserContext* PolicyCertServiceFactory::GetBrowserContextToUse( | 134 content::BrowserContext* PolicyCertServiceFactory::GetBrowserContextToUse( |
135 content::BrowserContext* context) const { | 135 content::BrowserContext* context) const { |
136 return chrome::GetBrowserContextOwnInstanceInIncognito(context); | 136 return chrome::GetBrowserContextOwnInstanceInIncognito(context); |
137 } | 137 } |
138 | 138 |
139 void PolicyCertServiceFactory::RegisterProfilePrefs( | 139 void PolicyCertServiceFactory::RegisterProfilePrefs( |
140 user_prefs::PrefRegistrySyncable* registry) { | 140 user_prefs::PrefRegistrySyncable* registry) { |
141 // TODO(joaodasilva): this is used for backwards compatibility. | 141 // TODO(joaodasilva): this is used for backwards compatibility. |
142 // Remove once it's not necessary anymore. | 142 // Remove once it's not necessary anymore. |
143 registry->RegisterBooleanPref( | 143 registry->RegisterBooleanPref(prefs::kUsedPolicyCertificatesOnce, false); |
144 prefs::kUsedPolicyCertificatesOnce, | |
145 false, | |
146 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
147 } | 144 } |
148 | 145 |
149 bool PolicyCertServiceFactory::ServiceIsNULLWhileTesting() const { | 146 bool PolicyCertServiceFactory::ServiceIsNULLWhileTesting() const { |
150 return true; | 147 return true; |
151 } | 148 } |
152 | 149 |
153 } // namespace policy | 150 } // namespace policy |
OLD | NEW |