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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 1849133006: Revert "ChromeOS: Add SystemTimezoneAutomaticDetection policy." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/browser_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index ef9fc77ac883ff9880f9a87a421d7fa9aa3f4bc7..fa16c8440531907befa2d1d5b15d1bd07a191ce3 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -1013,13 +1013,6 @@ void BrowserOptionsHandler::InitializeHandler() {
chromeos::kSystemTimezonePolicy,
base::Bind(&BrowserOptionsHandler::OnSystemTimezonePolicyChanged,
weak_ptr_factory_.GetWeakPtr()));
- local_state_pref_change_registrar_.Init(g_browser_process->local_state());
- local_state_pref_change_registrar_.Add(
- prefs::kSystemTimezoneAutomaticDetectionPolicy,
- base::Bind(&BrowserOptionsHandler::
- OnSystemTimezoneAutomaticDetectionPolicyChanged,
- base::Unretained(this)));
-
#else // !defined(OS_CHROMEOS)
profile_pref_registrar_.Add(
proxy_config::prefs::kProxy,
@@ -1088,7 +1081,6 @@ void BrowserOptionsHandler::InitializePage() {
profile->IsLegacySupervised()) {
web_ui()->CallJavascriptFunction("BrowserOptions.hideAndroidAppsSection");
}
- OnSystemTimezoneAutomaticDetectionPolicyChanged();
#endif
}
@@ -1448,22 +1440,6 @@ void BrowserOptionsHandler::OnSystemTimezonePolicyChanged() {
"BrowserOptions.setSystemTimezoneManaged",
base::FundamentalValue(chromeos::system::HasSystemTimezonePolicy()));
}
-
-void BrowserOptionsHandler::OnSystemTimezoneAutomaticDetectionPolicyChanged() {
- if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
- chromeos::switches::kEnableSystemTimezoneAutomaticDetectionPolicy)) {
- return;
- }
-
- PrefService* prefs = g_browser_process->local_state();
- const bool is_managed = prefs->IsManagedPreference(
- prefs::kSystemTimezoneAutomaticDetectionPolicy);
- const int value =
- prefs->GetInteger(prefs::kSystemTimezoneAutomaticDetectionPolicy);
- web_ui()->CallJavascriptFunction(
- "BrowserOptions.setSystemTimezoneAutomaticDetectionManaged",
- base::FundamentalValue(is_managed), base::FundamentalValue(value));
-}
#endif
scoped_ptr<base::DictionaryValue>
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698