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

Side by Side Diff: extensions/browser/updater/request_queue_impl.h

Issue 2837863004: Use base::OneShotTimer instead of base::Timer(false, false)
Patch Set: rebase Created 3 years, 7 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
« no previous file with comments | « extensions/browser/updater/request_queue.h ('k') | media/base/test_helpers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 EXTENSIONS_BROWSER_UPDATER_REQUEST_QUEUE_IMPL_H_ 5 #ifndef EXTENSIONS_BROWSER_UPDATER_REQUEST_QUEUE_IMPL_H_
6 #define EXTENSIONS_BROWSER_UPDATER_REQUEST_QUEUE_IMPL_H_ 6 #define EXTENSIONS_BROWSER_UPDATER_REQUEST_QUEUE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include <memory> 11 #include <memory>
12 #include <utility> 12 #include <utility>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
17 #include "extensions/browser/updater/request_queue.h" 17 #include "extensions/browser/updater/request_queue.h"
18 18
19 namespace extensions { 19 namespace extensions {
20 20
21 template <typename T> 21 template <typename T>
22 RequestQueue<T>::RequestQueue( 22 RequestQueue<T>::RequestQueue(
23 const net::BackoffEntry::Policy* const backoff_policy, 23 const net::BackoffEntry::Policy* const backoff_policy,
24 const base::Closure& start_request_callback) 24 const base::Closure& start_request_callback)
25 : backoff_policy_(backoff_policy), 25 : backoff_policy_(backoff_policy),
26 start_request_callback_(start_request_callback), 26 start_request_callback_(start_request_callback) {}
27 timer_(false, false) {
28 }
29 27
30 template <typename T> 28 template <typename T>
31 RequestQueue<T>::~RequestQueue() { 29 RequestQueue<T>::~RequestQueue() {
32 } 30 }
33 31
34 template <typename T> 32 template <typename T>
35 T* RequestQueue<T>::active_request() { 33 T* RequestQueue<T>::active_request() {
36 return active_request_.get(); 34 return active_request_.get();
37 } 35 }
38 36
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 146
149 // static 147 // static
150 template <typename T> 148 template <typename T>
151 bool RequestQueue<T>::CompareRequests(const Request& a, const Request& b) { 149 bool RequestQueue<T>::CompareRequests(const Request& a, const Request& b) {
152 return a.backoff_entry->GetReleaseTime() > b.backoff_entry->GetReleaseTime(); 150 return a.backoff_entry->GetReleaseTime() > b.backoff_entry->GetReleaseTime();
153 } 151 }
154 152
155 } // namespace extensions 153 } // namespace extensions
156 154
157 #endif // EXTENSIONS_BROWSER_UPDATER_REQUEST_QUEUE_IMPL_H_ 155 #endif // EXTENSIONS_BROWSER_UPDATER_REQUEST_QUEUE_IMPL_H_
OLDNEW
« no previous file with comments | « extensions/browser/updater/request_queue.h ('k') | media/base/test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698