| 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_ENTRY_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_THROTTLE_ENTRY_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSION_THROTTLE_ENTRY_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_THROTTLE_ENTRY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <queue> | 10 #include <queue> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "extensions/browser/extension_throttle_entry_interface.h" | 15 #include "extensions/browser/extension_throttle_entry_interface.h" |
| 16 #include "net/base/backoff_entry.h" | 16 #include "net/base/backoff_entry.h" |
| 17 #include "net/log/net_log.h" | 17 #include "net/log/net_log_with_source.h" |
| 18 | 18 |
| 19 namespace extensions { | 19 namespace extensions { |
| 20 | 20 |
| 21 class ExtensionThrottleManager; | 21 class ExtensionThrottleManager; |
| 22 | 22 |
| 23 // ExtensionThrottleEntry represents an entry of ExtensionThrottleManager. | 23 // ExtensionThrottleEntry represents an entry of ExtensionThrottleManager. |
| 24 // It analyzes requests of a specific URL over some period of time, in order to | 24 // It analyzes requests of a specific URL over some period of time, in order to |
| 25 // deduce the back-off time for every request. | 25 // deduce the back-off time for every request. |
| 26 // The back-off algorithm consists of two parts. Firstly, exponential back-off | 26 // The back-off algorithm consists of two parts. Firstly, exponential back-off |
| 27 // is used when receiving 5XX server errors or malformed response bodies. | 27 // is used when receiving 5XX server errors or malformed response bodies. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 net::NetLogWithSource net_log_; | 158 net::NetLogWithSource net_log_; |
| 159 bool ignore_user_gesture_load_flag_for_tests_; | 159 bool ignore_user_gesture_load_flag_for_tests_; |
| 160 | 160 |
| 161 DISALLOW_COPY_AND_ASSIGN(ExtensionThrottleEntry); | 161 DISALLOW_COPY_AND_ASSIGN(ExtensionThrottleEntry); |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 } // namespace extensions | 164 } // namespace extensions |
| 165 | 165 |
| 166 #endif // EXTENSIONS_BROWSER_EXTENSION_THROTTLE_ENTRY_H_ | 166 #endif // EXTENSIONS_BROWSER_EXTENSION_THROTTLE_ENTRY_H_ |
| OLD | NEW |