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

Side by Side Diff: chrome/browser/chromeos/system/timezone_resolver_manager.cc

Issue 2727593002: ChromeOS timezone detection: CfM devices default to static timezone. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chromeos/system/timezone_resolver_manager.h" 5 #include "chrome/browser/chromeos/system/timezone_resolver_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" 10 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h"
11 #include "chrome/browser/chromeos/preferences.h" 11 #include "chrome/browser/chromeos/preferences.h"
12 #include "chrome/browser/chromeos/system/input_device_settings.h"
12 #include "chrome/browser/chromeos/system/timezone_util.h" 13 #include "chrome/browser/chromeos/system/timezone_util.h"
13 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
14 #include "chromeos/chromeos_switches.h" 15 #include "chromeos/chromeos_switches.h"
15 #include "components/prefs/pref_service.h" 16 #include "components/prefs/pref_service.h"
16 17
17 namespace chromeos { 18 namespace chromeos {
18 namespace system { 19 namespace system {
19 20
20 namespace { 21 namespace {
21 22
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 if (value) 93 if (value)
93 return SHOULD_START; 94 return SHOULD_START;
94 95
95 return SHOULD_STOP; 96 return SHOULD_STOP;
96 } 97 }
97 98
98 // Returns service configuration for the signin screen. 99 // Returns service configuration for the signin screen.
99 ServiceConfiguration GetServiceConfigurationForSigninScreen() { 100 ServiceConfiguration GetServiceConfigurationForSigninScreen() {
100 if (!g_browser_process->local_state()->GetBoolean( 101 if (!g_browser_process->local_state()->GetBoolean(
101 prefs::kResolveDeviceTimezoneByGeolocation)) { 102 prefs::kResolveDeviceTimezoneByGeolocation)) {
102 return SHOULD_START; 103 // CfM devices default to static timezone.
104 bool keyboard_driven_oobe =
105 system::InputDeviceSettings::Get()->ForceKeyboardDrivenUINavigation();
106 return keyboard_driven_oobe ? SHOULD_STOP : SHOULD_START;
103 } 107 }
104 108
105 // Do not start resolver if we are inside active user session. 109 // Do not start resolver if we are inside active user session.
106 // If user preferences permit, it will be started on preferences 110 // If user preferences permit, it will be started on preferences
107 // initialization. 111 // initialization.
108 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginUser)) 112 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginUser))
109 return SHOULD_STOP; 113 return SHOULD_STOP;
110 114
111 return SHOULD_START; 115 return SHOULD_START;
112 } 116 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } else { 187 } else {
184 // We are on a signin page. 188 // We are on a signin page.
185 result = GetServiceConfigurationForSigninScreen(); 189 result = GetServiceConfigurationForSigninScreen();
186 } 190 }
187 } 191 }
188 return result == SHOULD_START; 192 return result == SHOULD_START;
189 } 193 }
190 194
191 } // namespace system 195 } // namespace system
192 } // namespace chromeos 196 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698