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

Side by Side Diff: components/rappor/log_uploader.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 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 #ifndef COMPONENTS_RAPPOR_LOG_UPLOADER_H_ 5 #ifndef COMPONENTS_RAPPOR_LOG_UPLOADER_H_
6 #define COMPONENTS_RAPPOR_LOG_UPLOADER_H_ 6 #define COMPONENTS_RAPPOR_LOG_UPLOADER_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // True if the uploader is currently running. 89 // True if the uploader is currently running.
90 bool is_running_; 90 bool is_running_;
91 91
92 // The outstanding transmission that appears as a URL Fetch operation. 92 // The outstanding transmission that appears as a URL Fetch operation.
93 scoped_ptr<net::URLFetcher> current_fetch_; 93 scoped_ptr<net::URLFetcher> current_fetch_;
94 94
95 // The logs that still need to be uploaded. 95 // The logs that still need to be uploaded.
96 std::queue<std::string> queued_logs_; 96 std::queue<std::string> queued_logs_;
97 97
98 // A timer used to delay before attempting another upload. 98 // A timer used to delay before attempting another upload.
99 base::OneShotTimer<LogUploader> upload_timer_; 99 base::OneShotTimer upload_timer_;
100 100
101 // Indicates that the last triggered upload hasn't resolved yet. 101 // Indicates that the last triggered upload hasn't resolved yet.
102 bool has_callback_pending_; 102 bool has_callback_pending_;
103 103
104 // The interval to wait after an upload's URLFetcher completion before 104 // The interval to wait after an upload's URLFetcher completion before
105 // starting the next upload attempt. 105 // starting the next upload attempt.
106 base::TimeDelta upload_interval_; 106 base::TimeDelta upload_interval_;
107 107
108 DISALLOW_COPY_AND_ASSIGN(LogUploader); 108 DISALLOW_COPY_AND_ASSIGN(LogUploader);
109 }; 109 };
110 110
111 } // namespace rappor 111 } // namespace rappor
112 112
113 #endif // COMPONENTS_RAPPOR_LOG_UPLOADER_H_ 113 #endif // COMPONENTS_RAPPOR_LOG_UPLOADER_H_
OLDNEW
« no previous file with comments | « components/proximity_auth/remote_device_life_cycle_impl.h ('k') | components/rappor/rappor_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698