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

Side by Side Diff: chrome/browser/ui/webui/settings/chromeos/date_time_handler.cc

Issue 2416213004: ChromeOS: removed outdated --disable-timezone-tracking-option switch. (Closed)
Patch Set: Created 4 years, 2 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 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/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" 9 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h"
10 #include "chrome/browser/chromeos/system/timezone_util.h" 10 #include "chrome/browser/chromeos/system/timezone_util.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 bool system_time_zone_automatic_detection_managed = 54 bool system_time_zone_automatic_detection_managed =
55 IsSystemTimezoneAutomaticDetectionManaged(); 55 IsSystemTimezoneAutomaticDetectionManaged();
56 html_source->AddBoolean("systemTimeZoneDetectionManaged", 56 html_source->AddBoolean("systemTimeZoneDetectionManaged",
57 system_time_zone_automatic_detection_managed); 57 system_time_zone_automatic_detection_managed);
58 if (system_time_zone_automatic_detection_managed) { 58 if (system_time_zone_automatic_detection_managed) {
59 html_source->AddInteger("systemTimeZoneDetectionPolicyValue", 59 html_source->AddInteger("systemTimeZoneDetectionPolicyValue",
60 GetSystemTimezoneAutomaticDetectionPolicyValue()); 60 GetSystemTimezoneAutomaticDetectionPolicyValue());
61 } 61 }
62 62
63 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
64 chromeos::switches::kDisableTimeZoneTrackingOption)) {
65 html_source->AddBoolean("hideTimeZoneDetection", true);
66 }
67
68 return new DateTimeHandler; 63 return new DateTimeHandler;
69 } 64 }
70 65
71 void DateTimeHandler::RegisterMessages() { 66 void DateTimeHandler::RegisterMessages() {
72 // TODO(michaelpg): Add time zone message handlers. 67 // TODO(michaelpg): Add time zone message handlers.
73 } 68 }
74 69
75 void DateTimeHandler::OnJavascriptAllowed() { 70 void DateTimeHandler::OnJavascriptAllowed() {
76 // TODO(michaelpg): Add policy observers. 71 // TODO(michaelpg): Add policy observers.
77 } 72 }
78 73
79 void DateTimeHandler::OnJavascriptDisallowed() { 74 void DateTimeHandler::OnJavascriptDisallowed() {
80 // TODO(michaelpg): Remove policy observers. 75 // TODO(michaelpg): Remove policy observers.
81 } 76 }
82 77
83 } // namespace settings 78 } // namespace settings
84 } // namespace chromeos 79 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698