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_pref_service_factory.h" | 5 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 { chrome_prefs::internals:: | 234 { chrome_prefs::internals:: |
235 kSettingsEnforcementGroupEnforceAlwaysWithDSE, | 235 kSettingsEnforcementGroupEnforceAlwaysWithDSE, |
236 GROUP_ENFORCE_ALWAYS_WITH_DSE }, | 236 GROUP_ENFORCE_ALWAYS_WITH_DSE }, |
237 { chrome_prefs::internals:: | 237 { chrome_prefs::internals:: |
238 kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE, | 238 kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE, |
239 GROUP_ENFORCE_ALWAYS_WITH_EXTENSIONS_AND_DSE }, | 239 GROUP_ENFORCE_ALWAYS_WITH_EXTENSIONS_AND_DSE }, |
240 }; | 240 }; |
241 | 241 |
242 // Use the strongest enforcement setting in the absence of a field trial | 242 // Use the strongest enforcement setting in the absence of a field trial |
243 // config on Windows. Remember to update the OFFICIAL_BUILD section of | 243 // config on Windows. Remember to update the OFFICIAL_BUILD section of |
244 // extension_startup_browsertest.cc and pref_hash_browsertest.cc when updating | 244 // extension_startup_browsertest.cc when updating the default value below. |
245 // the default value below. | |
246 // TODO(gab): Enforce this on all platforms. | 245 // TODO(gab): Enforce this on all platforms. |
247 SettingsEnforcementGroup enforcement_group = | 246 SettingsEnforcementGroup enforcement_group = |
248 #if defined(OS_WIN) | 247 #if defined(OS_WIN) |
249 GROUP_ENFORCE_DEFAULT; | 248 GROUP_ENFORCE_DEFAULT; |
250 #else | 249 #else |
251 GROUP_NO_ENFORCEMENT; | 250 GROUP_NO_ENFORCEMENT; |
252 #endif | 251 #endif |
253 bool group_determined_from_trial = false; | 252 bool group_determined_from_trial = false; |
254 base::FieldTrial* trial = | 253 base::FieldTrial* trial = |
255 base::FieldTrialList::Find( | 254 base::FieldTrialList::Find( |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 factory->set_read_error_callback(base::Bind(&HandleReadError)); | 400 factory->set_read_error_callback(base::Bind(&HandleReadError)); |
402 factory->set_user_prefs(user_pref_store); | 401 factory->set_user_prefs(user_pref_store); |
403 } | 402 } |
404 | 403 |
405 } // namespace | 404 } // namespace |
406 | 405 |
407 namespace chrome_prefs { | 406 namespace chrome_prefs { |
408 | 407 |
409 namespace internals { | 408 namespace internals { |
410 | 409 |
411 // Group modifications should be reflected in first_run_browsertest.cc and | |
412 // pref_hash_browsertest.cc. | |
413 const char kSettingsEnforcementTrialName[] = "SettingsEnforcement"; | 410 const char kSettingsEnforcementTrialName[] = "SettingsEnforcement"; |
414 const char kSettingsEnforcementGroupNoEnforcement[] = "no_enforcement"; | 411 const char kSettingsEnforcementGroupNoEnforcement[] = "no_enforcement"; |
415 const char kSettingsEnforcementGroupEnforceAlways[] = "enforce_always"; | 412 const char kSettingsEnforcementGroupEnforceAlways[] = "enforce_always"; |
416 const char kSettingsEnforcementGroupEnforceAlwaysWithDSE[] = | 413 const char kSettingsEnforcementGroupEnforceAlwaysWithDSE[] = |
417 "enforce_always_with_dse"; | 414 "enforce_always_with_dse"; |
418 const char kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE[] = | 415 const char kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE[] = |
419 "enforce_always_with_extensions_and_dse"; | 416 "enforce_always_with_extensions_and_dse"; |
420 | 417 |
421 } // namespace internals | 418 } // namespace internals |
422 | 419 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 | 511 |
515 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 512 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
516 ProfilePrefStoreManager::RegisterProfilePrefs(registry); | 513 ProfilePrefStoreManager::RegisterProfilePrefs(registry); |
517 } | 514 } |
518 | 515 |
519 void RegisterPrefs(PrefRegistrySimple* registry) { | 516 void RegisterPrefs(PrefRegistrySimple* registry) { |
520 ProfilePrefStoreManager::RegisterPrefs(registry); | 517 ProfilePrefStoreManager::RegisterPrefs(registry); |
521 } | 518 } |
522 | 519 |
523 } // namespace chrome_prefs | 520 } // namespace chrome_prefs |
OLD | NEW |