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

Side by Side Diff: chromeos/timezone/timezone_resolver.cc

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 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 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 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 private: 119 private:
120 const TimeZoneResolver* resolver_; 120 const TimeZoneResolver* resolver_;
121 121
122 // Returns delay to next timezone update request 122 // Returns delay to next timezone update request
123 base::TimeDelta CalculateNextInterval(); 123 base::TimeDelta CalculateNextInterval();
124 124
125 SimpleGeolocationProvider geolocation_provider_; 125 SimpleGeolocationProvider geolocation_provider_;
126 TimeZoneProvider timezone_provider_; 126 TimeZoneProvider timezone_provider_;
127 127
128 base::OneShotTimer<TimeZoneResolver::TimeZoneResolverImpl> refresh_timer_; 128 base::OneShotTimer refresh_timer_;
129 129
130 // Total number of request attempts. 130 // Total number of request attempts.
131 int requests_count_; 131 int requests_count_;
132 132
133 // This is not NULL when update is in progress. 133 // This is not NULL when update is in progress.
134 scoped_ptr<TZRequest> request_; 134 scoped_ptr<TZRequest> request_;
135 135
136 base::WeakPtrFactory<TimeZoneResolver::TimeZoneResolverImpl> 136 base::WeakPtrFactory<TimeZoneResolver::TimeZoneResolverImpl>
137 weak_ptr_factory_; 137 weak_ptr_factory_;
138 138
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 int TimeZoneResolver::IntervalForNextRequestForTesting(const int requests) { 412 int TimeZoneResolver::IntervalForNextRequestForTesting(const int requests) {
413 return IntervalForNextRequest(requests); 413 return IntervalForNextRequest(requests);
414 } 414 }
415 415
416 // static 416 // static
417 void TimeZoneResolver::RegisterPrefs(PrefRegistrySimple* registry) { 417 void TimeZoneResolver::RegisterPrefs(PrefRegistrySimple* registry) {
418 registry->RegisterInt64Pref(kLastTimeZoneRefreshTime, 0); 418 registry->RegisterInt64Pref(kLastTimeZoneRefreshTime, 0);
419 } 419 }
420 420
421 } // namespace chromeos 421 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/timezone/timezone_request.h ('k') | components/autofill/content/browser/risk/fingerprint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698