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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 944593002: ChromeOS: Update browser option UI for automatic timezone detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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/ui/webui/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 values->SetBoolean( 671 values->SetBoolean(
672 "showWakeOnWifi", 672 "showWakeOnWifi",
673 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() && 673 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() &&
674 chromeos::switches::WakeOnWifiEnabled()); 674 chromeos::switches::WakeOnWifiEnabled());
675 const bool have_disable_time_zone_tracking_option_switch = 675 const bool have_disable_time_zone_tracking_option_switch =
676 base::CommandLine::ForCurrentProcess()->HasSwitch( 676 base::CommandLine::ForCurrentProcess()->HasSwitch(
677 chromeos::switches::kDisableTimeZoneTrackingOption); 677 chromeos::switches::kDisableTimeZoneTrackingOption);
678 values->SetBoolean("enableTimeZoneTrackingOption", 678 values->SetBoolean("enableTimeZoneTrackingOption",
679 !have_disable_time_zone_tracking_option_switch && 679 !have_disable_time_zone_tracking_option_switch &&
680 !chromeos::system::HasSystemTimezonePolicy()); 680 !chromeos::system::HasSystemTimezonePolicy());
681 values->SetBoolean("resolveTimezoneByGeolocationInitialValue",
682 Profile::FromWebUI(web_ui())->GetPrefs()->GetBoolean(
683 prefs::kResolveTimezoneByGeolocation));
681 #endif 684 #endif
682 } 685 }
683 686
684 #if defined(ENABLE_PRINT_PREVIEW) 687 #if defined(ENABLE_PRINT_PREVIEW)
685 void BrowserOptionsHandler::RegisterCloudPrintValues( 688 void BrowserOptionsHandler::RegisterCloudPrintValues(
686 base::DictionaryValue* values) { 689 base::DictionaryValue* values) {
687 values->SetString("cloudPrintOptionLabel", 690 values->SetString("cloudPrintOptionLabel",
688 l10n_util::GetStringFUTF16( 691 l10n_util::GetStringFUTF16(
689 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL, 692 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL,
690 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); 693 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after
2120 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, 2123 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns,
2121 const policy::PolicyMap& previous, 2124 const policy::PolicyMap& previous,
2122 const policy::PolicyMap& current) { 2125 const policy::PolicyMap& current) {
2123 std::set<std::string> different_keys; 2126 std::set<std::string> different_keys;
2124 current.GetDifferingKeys(previous, &different_keys); 2127 current.GetDifferingKeys(previous, &different_keys);
2125 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) 2128 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled))
2126 SetupMetricsReportingCheckbox(); 2129 SetupMetricsReportingCheckbox();
2127 } 2130 }
2128 2131
2129 } // namespace options 2132 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698