| OLD | NEW |
| 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 CHROME_BROWSER_POLICY_RATE_LIMITER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_RATE_LIMITER_H_ |
| 6 #define CHROME_BROWSER_POLICY_RATE_LIMITER_H_ | 6 #define CHROME_BROWSER_POLICY_CLOUD_RATE_LIMITER_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/cancelable_callback.h" | 12 #include "base/cancelable_callback.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/threading/non_thread_safe.h" | 15 #include "base/threading/non_thread_safe.h" |
| 16 #include "base/time.h" | 16 #include "base/time.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 scoped_ptr<base::TickClock> clock_; | 49 scoped_ptr<base::TickClock> clock_; |
| 50 | 50 |
| 51 std::queue<base::TimeTicks> invocation_times_; | 51 std::queue<base::TimeTicks> invocation_times_; |
| 52 base::CancelableClosure delayed_callback_; | 52 base::CancelableClosure delayed_callback_; |
| 53 | 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(RateLimiter); | 54 DISALLOW_COPY_AND_ASSIGN(RateLimiter); |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace policy | 57 } // namespace policy |
| 58 | 58 |
| 59 #endif // CHROME_BROWSER_POLICY_RATE_LIMITER_H_ | 59 #endif // CHROME_BROWSER_POLICY_CLOUD_RATE_LIMITER_H_ |
| OLD | NEW |