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

Side by Side Diff: components/variations/variations_request_scheduler.h

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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_ 5 #ifndef COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_
6 #define COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_ 6 #define COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 private: 50 private:
51 FRIEND_TEST_ALL_PREFIXES(VariationsRequestSchedulerTest, 51 FRIEND_TEST_ALL_PREFIXES(VariationsRequestSchedulerTest,
52 ScheduleFetchShortly); 52 ScheduleFetchShortly);
53 53
54 // The task scheduled by this class. 54 // The task scheduled by this class.
55 base::Closure task_; 55 base::Closure task_;
56 56
57 // The timer used to repeatedly ping the server. Keep this as an instance 57 // The timer used to repeatedly ping the server. Keep this as an instance
58 // member so if VariationsRequestScheduler goes out of scope, the timer is 58 // member so if VariationsRequestScheduler goes out of scope, the timer is
59 // automatically canceled. 59 // automatically canceled.
60 base::RepeatingTimer<VariationsRequestScheduler> timer_; 60 base::RepeatingTimer timer_;
61 61
62 // A one-shot timer used for scheduling out-of-band fetches. 62 // A one-shot timer used for scheduling out-of-band fetches.
63 base::OneShotTimer<VariationsRequestScheduler> one_shot_timer_; 63 base::OneShotTimer one_shot_timer_;
64 64
65 DISALLOW_COPY_AND_ASSIGN(VariationsRequestScheduler); 65 DISALLOW_COPY_AND_ASSIGN(VariationsRequestScheduler);
66 }; 66 };
67 67
68 } // namespace variations 68 } // namespace variations
69 69
70 #endif // COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_ 70 #endif // COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_
OLDNEW
« no previous file with comments | « components/update_client/background_downloader_win.cc ('k') | components/variations/variations_request_scheduler_mobile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698