OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromeos/timezone/timezone_resolver.h" | 5 #include "chromeos/timezone/timezone_resolver.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 scoped_refptr<net::URLRequestContextGetter> context, | 391 scoped_refptr<net::URLRequestContextGetter> context, |
392 const GURL& url, | 392 const GURL& url, |
393 const ApplyTimeZoneCallback& apply_timezone, | 393 const ApplyTimeZoneCallback& apply_timezone, |
394 const DelayNetworkCallClosure& delay_network_call, | 394 const DelayNetworkCallClosure& delay_network_call, |
395 PrefService* local_state) | 395 PrefService* local_state) |
396 : delegate_(delegate), | 396 : delegate_(delegate), |
397 context_(context), | 397 context_(context), |
398 url_(url), | 398 url_(url), |
399 apply_timezone_(apply_timezone), | 399 apply_timezone_(apply_timezone), |
400 delay_network_call_(delay_network_call), | 400 delay_network_call_(delay_network_call), |
401 local_state_(local_state), | 401 local_state_(local_state) { |
402 send_wifi_data_to_geolocation_api_(false) { | |
403 DCHECK(!apply_timezone.is_null()); | 402 DCHECK(!apply_timezone.is_null()); |
404 DCHECK(delegate_); | 403 DCHECK(delegate_); |
405 } | 404 } |
406 | 405 |
407 TimeZoneResolver::~TimeZoneResolver() { | 406 TimeZoneResolver::~TimeZoneResolver() { |
408 Stop(); | 407 Stop(); |
409 } | 408 } |
410 | 409 |
411 void TimeZoneResolver::Start() { | 410 void TimeZoneResolver::Start() { |
412 DCHECK(thread_checker_.CalledOnValidThread()); | 411 DCHECK(thread_checker_.CalledOnValidThread()); |
(...skipping 22 matching lines...) Expand all Loading... |
435 // static | 434 // static |
436 void TimeZoneResolver::RegisterPrefs(PrefRegistrySimple* registry) { | 435 void TimeZoneResolver::RegisterPrefs(PrefRegistrySimple* registry) { |
437 registry->RegisterInt64Pref(kLastTimeZoneRefreshTime, 0); | 436 registry->RegisterInt64Pref(kLastTimeZoneRefreshTime, 0); |
438 } | 437 } |
439 | 438 |
440 bool TimeZoneResolver::ShouldSendWiFiGeolocationData() const { | 439 bool TimeZoneResolver::ShouldSendWiFiGeolocationData() const { |
441 return delegate_->ShouldSendWiFiGeolocationData(); | 440 return delegate_->ShouldSendWiFiGeolocationData(); |
442 } | 441 } |
443 | 442 |
444 } // namespace chromeos | 443 } // namespace chromeos |
OLD | NEW |