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

Side by Side Diff: chrome/browser/prefs/chrome_pref_service_factory.cc

Issue 227523003: Only enforce the strongest SettingsEnforcement group in the absence of a Finch config on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 { chrome_prefs::internals::kSettingsEnforcementGroupEnforceOnload, 197 { chrome_prefs::internals::kSettingsEnforcementGroupEnforceOnload,
198 GROUP_ENFORCE_ON_LOAD }, 198 GROUP_ENFORCE_ON_LOAD },
199 { chrome_prefs::internals::kSettingsEnforcementGroupEnforceAlways, 199 { chrome_prefs::internals::kSettingsEnforcementGroupEnforceAlways,
200 GROUP_ENFORCE_ALWAYS }, 200 GROUP_ENFORCE_ALWAYS },
201 { chrome_prefs::internals:: 201 { chrome_prefs::internals::
202 kSettingsEnforcementGroupEnforceAlwaysWithExtensions, 202 kSettingsEnforcementGroupEnforceAlwaysWithExtensions,
203 GROUP_ENFORCE_ALWAYS_WITH_EXTENSIONS }, 203 GROUP_ENFORCE_ALWAYS_WITH_EXTENSIONS },
204 }; 204 };
205 205
206 // Use the strongest enforcement setting in the absence of a field trial 206 // Use the strongest enforcement setting in the absence of a field trial
207 // config. 207 // config on Windows.
208 SettingsEnforcementGroup enforcement_group = GROUP_ENFORCE_DEFAULT; 208 // TODO(gab): Enforce this on all platforms.
209 SettingsEnforcementGroup enforcement_group =
210 #if defined(OS_WIN)
211 GROUP_ENFORCE_DEFAULT;
212 #else
213 NO_ENFORCEMENT;
robertshield 2014/04/09 23:26:21 GROUP_NO_ENFORCEMENT?
gab 2014/04/10 13:15:25 Duh, of course :). Done.
214 #endif
209 bool group_determined_from_trial = false; 215 bool group_determined_from_trial = false;
210 base::FieldTrial* trial = 216 base::FieldTrial* trial =
211 base::FieldTrialList::Find( 217 base::FieldTrialList::Find(
212 chrome_prefs::internals::kSettingsEnforcementTrialName); 218 chrome_prefs::internals::kSettingsEnforcementTrialName);
213 if (trial) { 219 if (trial) {
214 const std::string& group_name = trial->group_name(); 220 const std::string& group_name = trial->group_name();
215 // ARRAYSIZE_UNSAFE must be used since the array is declared locally; it is 221 // ARRAYSIZE_UNSAFE must be used since the array is declared locally; it is
216 // only unsafe because it could not trigger a compile error on some 222 // only unsafe because it could not trigger a compile error on some
217 // non-array pointer types; this is fine since kEnforcementLevelMap is 223 // non-array pointer types; this is fine since kEnforcementLevelMap is
218 // clearly an array. 224 // clearly an array.
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 493
488 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 494 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
489 ProfilePrefStoreManager::RegisterProfilePrefs(registry); 495 ProfilePrefStoreManager::RegisterProfilePrefs(registry);
490 } 496 }
491 497
492 void RegisterPrefs(PrefRegistrySimple* registry) { 498 void RegisterPrefs(PrefRegistrySimple* registry) {
493 ProfilePrefStoreManager::RegisterPrefs(registry); 499 ProfilePrefStoreManager::RegisterPrefs(registry);
494 } 500 }
495 501
496 } // namespace chrome_prefs 502 } // namespace chrome_prefs
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698