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

Unified Diff: chrome/browser/prefs/chrome_pref_service_factory.cc

Issue 619423002: Remove the domain check gating settings protection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prefs/chrome_pref_service_factory.cc
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc
index 733491a0f74fd71c6e28c009366a90e3e1debb3d..1b662812772c001b0f2cd718723bd146c4dc238c 100644
--- a/chrome/browser/prefs/chrome_pref_service_factory.cc
+++ b/chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -65,24 +65,15 @@
#include "chrome/browser/supervised_user/supervised_user_pref_store.h"
#endif
-#if defined(OS_WIN)
-#include "base/win/win_util.h"
-#if defined(ENABLE_RLZ)
+#if defined(OS_WIN) && defined(ENABLE_RLZ)
#include "rlz/lib/machine_id.h"
-#endif // defined(ENABLE_RLZ)
-#endif // defined(OS_WIN)
+#endif // defined(ENABLE_RLZ) && defined(OS_WIN)
using content::BrowserContext;
using content::BrowserThread;
namespace {
-// Whether we are in testing mode; can be enabled via
-// DisableDelaysAndDomainCheckForTesting(). Forces startup checks to occur
-// with no delay and ignores the presence of a domain when determining the
-// active SettingsEnforcement group.
-bool g_disable_delays_and_domain_check_for_testing = false;
-
// These preferences must be kept in sync with the TrackedPreference enum in
// tools/metrics/histograms/histograms.xml. To add a new preference, append it
// to the array and add a corresponding value to the histogram enum. Each
@@ -215,20 +206,6 @@ enum SettingsEnforcementGroup {
};
SettingsEnforcementGroup GetSettingsEnforcementGroup() {
-# if defined(OS_WIN)
- if (!g_disable_delays_and_domain_check_for_testing) {
- static bool first_call = true;
- static const bool is_enrolled_to_domain = base::win::IsEnrolledToDomain();
- if (first_call) {
- UMA_HISTOGRAM_BOOLEAN("Settings.TrackedPreferencesNoEnforcementOnDomain",
- is_enrolled_to_domain);
- first_call = false;
- }
- if (is_enrolled_to_domain)
- return GROUP_NO_ENFORCEMENT;
- }
-#endif
-
struct {
const char* group_name;
SettingsEnforcementGroup group;
@@ -506,16 +483,10 @@ void SchedulePrefsFilePathVerification(const base::FilePath& profile_path) {
base::Bind(&VerifyPreferencesFile,
ProfilePrefStoreManager::GetPrefFilePathFromProfilePath(
profile_path)),
- base::TimeDelta::FromSeconds(g_disable_delays_and_domain_check_for_testing
- ? 0
- : kVerifyPrefsFileDelaySeconds));
+ base::TimeDelta::FromSeconds(kVerifyPrefsFileDelaySeconds));
robertshield 2014/10/02 21:40:43 do you not still desire to be able to disable the
gab 2014/10/02 21:46:00 It wasn't used (i.e. nothing tests this -- removin
robertshield 2014/10/02 21:53:03 Not overly, no. I think this CL is fine as is.
#endif
}
-void DisableDelaysAndDomainCheckForTesting() {
- g_disable_delays_and_domain_check_for_testing = true;
-}
-
bool InitializePrefsFromMasterPrefs(
const base::FilePath& profile_path,
const base::DictionaryValue& master_prefs) {

Powered by Google App Engine
This is Rietveld 408576698