| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/settings/chromeos/date_time_handler.h" | 5 #include "chrome/browser/ui/webui/settings/chromeos/date_time_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 void DateTimeHandler::NotifyTimezoneAutomaticDetectionPolicy() { | 166 void DateTimeHandler::NotifyTimezoneAutomaticDetectionPolicy() { |
| 167 bool managed = !IsTimezoneAutomaticDetectionUserEditable(); | 167 bool managed = !IsTimezoneAutomaticDetectionUserEditable(); |
| 168 bool force_enabled = managed && | 168 bool force_enabled = managed && |
| 169 g_browser_process->platform_part() | 169 g_browser_process->platform_part() |
| 170 ->GetTimezoneResolverManager() | 170 ->GetTimezoneResolverManager() |
| 171 ->ShouldApplyResolvedTimezone(); | 171 ->ShouldApplyResolvedTimezone(); |
| 172 | 172 |
| 173 CallJavascriptFunction("cr.webUIListenerCallback", | 173 CallJavascriptFunction("cr.webUIListenerCallback", |
| 174 base::StringValue("time-zone-auto-detect-policy"), | 174 base::StringValue("time-zone-auto-detect-policy"), |
| 175 base::FundamentalValue(managed), | 175 base::Value(managed), |
| 176 base::FundamentalValue(force_enabled)); | 176 base::Value(force_enabled)); |
| 177 } | 177 } |
| 178 | 178 |
| 179 void DateTimeHandler::SystemClockCanSetTimeChanged(bool can_set_time) { | 179 void DateTimeHandler::SystemClockCanSetTimeChanged(bool can_set_time) { |
| 180 CallJavascriptFunction("cr.webUIListenerCallback", | 180 CallJavascriptFunction("cr.webUIListenerCallback", |
| 181 base::StringValue("can-set-date-time-changed"), | 181 base::StringValue("can-set-date-time-changed"), |
| 182 base::FundamentalValue(can_set_time)); | 182 base::Value(can_set_time)); |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace settings | 185 } // namespace settings |
| 186 } // namespace chromeos | 186 } // namespace chromeos |
| OLD | NEW |