OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/prefs/chrome_command_line_pref_store.h> | 5 #include <chrome/browser/prefs/chrome_command_line_pref_store.h> |
6 #include "chrome/browser/prefs/chrome_pref_service_factory.h" | 6 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 GROUP_ENFORCE_ALWAYS }, | 223 GROUP_ENFORCE_ALWAYS }, |
224 { chrome_prefs::internals:: | 224 { chrome_prefs::internals:: |
225 kSettingsEnforcementGroupEnforceAlwaysWithDSE, | 225 kSettingsEnforcementGroupEnforceAlwaysWithDSE, |
226 GROUP_ENFORCE_ALWAYS_WITH_DSE }, | 226 GROUP_ENFORCE_ALWAYS_WITH_DSE }, |
227 { chrome_prefs::internals:: | 227 { chrome_prefs::internals:: |
228 kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE, | 228 kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE, |
229 GROUP_ENFORCE_ALWAYS_WITH_EXTENSIONS_AND_DSE }, | 229 GROUP_ENFORCE_ALWAYS_WITH_EXTENSIONS_AND_DSE }, |
230 }; | 230 }; |
231 | 231 |
232 // Use the strongest enforcement setting in the absence of a field trial | 232 // Use the strongest enforcement setting in the absence of a field trial |
233 // config on Windows. Remember to update the OFFICIAL_BUILD section of | 233 // config on Windows and MacOS. Remember to update the OFFICIAL_BUILD section |
234 // extension_startup_browsertest.cc and pref_hash_browsertest.cc when updating | 234 // of extension_startup_browsertest.cc and pref_hash_browsertest.cc when |
235 // the default value below. | 235 // updating the default value below. |
236 // TODO(gab): Enforce this on all platforms. | 236 // TODO(gab): Enforce this on all platforms. |
237 SettingsEnforcementGroup enforcement_group = | 237 SettingsEnforcementGroup enforcement_group = |
238 #if defined(OS_WIN) | 238 #if defined(OS_WIN) || defined(OS_MACOSX) |
239 GROUP_ENFORCE_DEFAULT; | 239 GROUP_ENFORCE_DEFAULT; |
240 #else | 240 #else |
241 GROUP_NO_ENFORCEMENT; | 241 GROUP_NO_ENFORCEMENT; |
242 #endif | 242 #endif |
243 bool group_determined_from_trial = false; | 243 bool group_determined_from_trial = false; |
244 base::FieldTrial* trial = | 244 base::FieldTrial* trial = |
245 base::FieldTrialList::Find( | 245 base::FieldTrialList::Find( |
246 chrome_prefs::internals::kSettingsEnforcementTrialName); | 246 chrome_prefs::internals::kSettingsEnforcementTrialName); |
247 if (trial) { | 247 if (trial) { |
248 const std::string& group_name = trial->group_name(); | 248 const std::string& group_name = trial->group_name(); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 | 483 |
484 void ClearResetTime(Profile* profile) { | 484 void ClearResetTime(Profile* profile) { |
485 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); | 485 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); |
486 } | 486 } |
487 | 487 |
488 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 488 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
489 ProfilePrefStoreManager::RegisterProfilePrefs(registry); | 489 ProfilePrefStoreManager::RegisterProfilePrefs(registry); |
490 } | 490 } |
491 | 491 |
492 } // namespace chrome_prefs | 492 } // namespace chrome_prefs |
OLD | NEW |