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

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: Fixed SharedOptionsTest. Created 5 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 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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 values->SetBoolean( 674 values->SetBoolean(
675 "showWakeOnWifi", 675 "showWakeOnWifi",
676 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() && 676 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() &&
677 chromeos::switches::WakeOnWifiEnabled()); 677 chromeos::switches::WakeOnWifiEnabled());
678 const bool have_disable_time_zone_tracking_option_switch = 678 const bool have_disable_time_zone_tracking_option_switch =
679 base::CommandLine::ForCurrentProcess()->HasSwitch( 679 base::CommandLine::ForCurrentProcess()->HasSwitch(
680 chromeos::switches::kDisableTimeZoneTrackingOption); 680 chromeos::switches::kDisableTimeZoneTrackingOption);
681 values->SetBoolean("enableTimeZoneTrackingOption", 681 values->SetBoolean("enableTimeZoneTrackingOption",
682 !have_disable_time_zone_tracking_option_switch && 682 !have_disable_time_zone_tracking_option_switch &&
683 !chromeos::system::HasSystemTimezonePolicy()); 683 !chromeos::system::HasSystemTimezonePolicy());
684 values->SetBoolean("resolveTimezoneByGeolocationInitialValue",
685 Profile::FromWebUI(web_ui())->GetPrefs()->GetBoolean(
686 prefs::kResolveTimezoneByGeolocation));
684 #endif 687 #endif
685 } 688 }
686 689
687 #if defined(ENABLE_PRINT_PREVIEW) 690 #if defined(ENABLE_PRINT_PREVIEW)
688 void BrowserOptionsHandler::RegisterCloudPrintValues( 691 void BrowserOptionsHandler::RegisterCloudPrintValues(
689 base::DictionaryValue* values) { 692 base::DictionaryValue* values) {
690 values->SetString("cloudPrintOptionLabel", 693 values->SetString("cloudPrintOptionLabel",
691 l10n_util::GetStringFUTF16( 694 l10n_util::GetStringFUTF16(
692 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL, 695 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL,
693 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); 696 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, 2173 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns,
2171 const policy::PolicyMap& previous, 2174 const policy::PolicyMap& previous,
2172 const policy::PolicyMap& current) { 2175 const policy::PolicyMap& current) {
2173 std::set<std::string> different_keys; 2176 std::set<std::string> different_keys;
2174 current.GetDifferingKeys(previous, &different_keys); 2177 current.GetDifferingKeys(previous, &different_keys);
2175 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) 2178 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled))
2176 SetupMetricsReportingCheckbox(); 2179 SetupMetricsReportingCheckbox();
2177 } 2180 }
2178 2181
2179 } // namespace options 2182 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698