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 #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 Loading... |
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_ |
OLD | NEW |