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

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

Issue 2624843003: Add support for cellular geolocation (Closed)
Patch Set: Use cell tower info in SimpleGeolocationProvider. Created 3 years, 10 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/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"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 int policy_value = 137 int policy_value =
138 local_state->GetInteger(prefs::kSystemTimezoneAutomaticDetectionPolicy); 138 local_state->GetInteger(prefs::kSystemTimezoneAutomaticDetectionPolicy);
139 139
140 DCHECK(policy_value <= enterprise_management::SystemTimezoneProto:: 140 DCHECK(policy_value <= enterprise_management::SystemTimezoneProto::
141 AutomaticTimezoneDetectionType_MAX); 141 AutomaticTimezoneDetectionType_MAX);
142 142
143 return policy_value == 143 return policy_value ==
144 enterprise_management::SystemTimezoneProto::SEND_WIFI_ACCESS_POINTS; 144 enterprise_management::SystemTimezoneProto::SEND_WIFI_ACCESS_POINTS;
145 } 145 }
146 146
147 bool TimeZoneResolverManager::ShouldSendCellularGeolocationData() {
148 // Cellular and wifi are currently bundled
149 return ShouldSendWiFiGeolocationData();
150 }
151
147 void TimeZoneResolverManager::UpdateTimezoneResolver() { 152 void TimeZoneResolverManager::UpdateTimezoneResolver() {
148 if (TimeZoneResolverShouldBeRunning()) 153 if (TimeZoneResolverShouldBeRunning())
149 g_browser_process->platform_part()->GetTimezoneResolver()->Start(); 154 g_browser_process->platform_part()->GetTimezoneResolver()->Start();
150 else 155 else
151 g_browser_process->platform_part()->GetTimezoneResolver()->Stop(); 156 g_browser_process->platform_part()->GetTimezoneResolver()->Stop();
152 } 157 }
153 158
154 bool TimeZoneResolverManager::ShouldApplyResolvedTimezone() { 159 bool TimeZoneResolverManager::ShouldApplyResolvedTimezone() {
155 return TimeZoneResolverShouldBeRunning(); 160 return TimeZoneResolverShouldBeRunning();
156 } 161 }
(...skipping 11 matching lines...) Expand all
168 } else { 173 } else {
169 // We are on a signin page. 174 // We are on a signin page.
170 result = GetServiceConfigurationForSigninScreen(); 175 result = GetServiceConfigurationForSigninScreen();
171 } 176 }
172 } 177 }
173 return result == SHOULD_START; 178 return result == SHOULD_START;
174 } 179 }
175 180
176 } // namespace system 181 } // namespace system
177 } // namespace chromeos 182 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698