| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1457 base::FundamentalValue(managed)); | 1457 base::FundamentalValue(managed)); |
| 1458 } | 1458 } |
| 1459 | 1459 |
| 1460 void BrowserOptionsHandler::OnSystemTimezonePolicyChanged() { | 1460 void BrowserOptionsHandler::OnSystemTimezonePolicyChanged() { |
| 1461 web_ui()->CallJavascriptFunction( | 1461 web_ui()->CallJavascriptFunction( |
| 1462 "BrowserOptions.setSystemTimezoneManaged", | 1462 "BrowserOptions.setSystemTimezoneManaged", |
| 1463 base::FundamentalValue(chromeos::system::HasSystemTimezonePolicy())); | 1463 base::FundamentalValue(chromeos::system::HasSystemTimezonePolicy())); |
| 1464 } | 1464 } |
| 1465 | 1465 |
| 1466 void BrowserOptionsHandler::OnSystemTimezoneAutomaticDetectionPolicyChanged() { | 1466 void BrowserOptionsHandler::OnSystemTimezoneAutomaticDetectionPolicyChanged() { |
| 1467 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 1467 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1468 chromeos::switches::kEnableSystemTimezoneAutomaticDetectionPolicy)) { | 1468 chromeos::switches::kDisableSystemTimezoneAutomaticDetectionPolicy)) { |
| 1469 return; | 1469 return; |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 PrefService* prefs = g_browser_process->local_state(); | 1472 PrefService* prefs = g_browser_process->local_state(); |
| 1473 const bool is_managed = prefs->IsManagedPreference( | 1473 const bool is_managed = prefs->IsManagedPreference( |
| 1474 prefs::kSystemTimezoneAutomaticDetectionPolicy); | 1474 prefs::kSystemTimezoneAutomaticDetectionPolicy); |
| 1475 const int value = | 1475 const int value = |
| 1476 prefs->GetInteger(prefs::kSystemTimezoneAutomaticDetectionPolicy); | 1476 prefs->GetInteger(prefs::kSystemTimezoneAutomaticDetectionPolicy); |
| 1477 web_ui()->CallJavascriptFunction( | 1477 web_ui()->CallJavascriptFunction( |
| 1478 "BrowserOptions.setSystemTimezoneAutomaticDetectionManaged", | 1478 "BrowserOptions.setSystemTimezoneAutomaticDetectionManaged", |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2179 | 2179 |
| 2180 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2180 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
| 2181 #if defined(OS_CHROMEOS) | 2181 #if defined(OS_CHROMEOS) |
| 2182 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2182 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
| 2183 #else | 2183 #else |
| 2184 return true; | 2184 return true; |
| 2185 #endif | 2185 #endif |
| 2186 } | 2186 } |
| 2187 | 2187 |
| 2188 } // namespace options | 2188 } // namespace options |
| OLD | NEW |