OLD | NEW |
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_EXTENSION_THROTTLE_MANAGER_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_THROTTLE_MANAGER_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSION_THROTTLE_MANAGER_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_THROTTLE_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/threading/non_thread_safe.h" | 14 #include "base/threading/non_thread_safe.h" |
15 #include "base/threading/platform_thread.h" | 15 #include "base/threading/platform_thread.h" |
16 #include "extensions/browser/extension_throttle_entry.h" | 16 #include "extensions/browser/extension_throttle_entry.h" |
17 #include "net/base/backoff_entry.h" | 17 #include "net/base/backoff_entry.h" |
18 #include "net/base/net_export.h" | 18 #include "net/base/net_export.h" |
19 #include "net/base/network_change_notifier.h" | 19 #include "net/base/network_change_notifier.h" |
20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 class ResourceThrottle; | 23 class ResourceThrottle; |
24 } | 24 } |
25 | 25 |
26 namespace net { | 26 namespace net { |
| 27 class NetLog; |
27 class NetLogWithSource; | 28 class NetLogWithSource; |
28 class NetLog; | |
29 } | 29 } |
30 | 30 |
31 namespace extensions { | 31 namespace extensions { |
32 | 32 |
33 // Class that registers URL request throttler entries for URLs being accessed | 33 // Class that registers URL request throttler entries for URLs being accessed |
34 // in order to supervise traffic. URL requests for HTTP contents should | 34 // in order to supervise traffic. URL requests for HTTP contents should |
35 // register their URLs in this manager on each request. | 35 // register their URLs in this manager on each request. |
36 // | 36 // |
37 // ExtensionThrottleManager maintains a map of URL IDs to URL request | 37 // ExtensionThrottleManager maintains a map of URL IDs to URL request |
38 // throttler entries. It creates URL request throttler entries when new URLs | 38 // throttler entries. It creates URL request throttler entries when new URLs |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 177 |
178 // This is NULL when it is not set for tests. | 178 // This is NULL when it is not set for tests. |
179 std::unique_ptr<net::BackoffEntry::Policy> backoff_policy_for_tests_; | 179 std::unique_ptr<net::BackoffEntry::Policy> backoff_policy_for_tests_; |
180 | 180 |
181 DISALLOW_COPY_AND_ASSIGN(ExtensionThrottleManager); | 181 DISALLOW_COPY_AND_ASSIGN(ExtensionThrottleManager); |
182 }; | 182 }; |
183 | 183 |
184 } // namespace extensions | 184 } // namespace extensions |
185 | 185 |
186 #endif // EXTENSIONS_BROWSER_EXTENSION_THROTTLE_MANAGER_H_ | 186 #endif // EXTENSIONS_BROWSER_EXTENSION_THROTTLE_MANAGER_H_ |
OLD | NEW |