| 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 NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_INTERFACE_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_INTERFACE_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_INTERFACE_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 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/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "net/base/net_export.h" | 15 #include "net/base/net_export.h" |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 | 18 |
| 19 class NetworkDelegate; | |
| 20 class URLRequest; | 19 class URLRequest; |
| 21 class URLRequestThrottlerHeaderInterface; | |
| 22 | 20 |
| 23 // Interface provided on entries of the URL request throttler manager. | 21 // Interface provided on entries of the URL request throttler manager. |
| 24 class NET_EXPORT URLRequestThrottlerEntryInterface | 22 class NET_EXPORT URLRequestThrottlerEntryInterface |
| 25 : public base::RefCountedThreadSafe<URLRequestThrottlerEntryInterface> { | 23 : public base::RefCountedThreadSafe<URLRequestThrottlerEntryInterface> { |
| 26 public: | 24 public: |
| 27 URLRequestThrottlerEntryInterface() {} | 25 URLRequestThrottlerEntryInterface() {} |
| 28 | 26 |
| 29 // Returns true when we have encountered server errors and are doing | 27 // Returns true when we have encountered server errors and are doing |
| 30 // exponential back-off, unless the request has load flags that mean | 28 // exponential back-off, unless the request has load flags that mean |
| 31 // it is likely to be user-initiated. | 29 // it is likely to be user-initiated. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 virtual ~URLRequestThrottlerEntryInterface() {} | 62 virtual ~URLRequestThrottlerEntryInterface() {} |
| 65 | 63 |
| 66 private: | 64 private: |
| 67 friend class base::RefCounted<URLRequestThrottlerEntryInterface>; | 65 friend class base::RefCounted<URLRequestThrottlerEntryInterface>; |
| 68 DISALLOW_COPY_AND_ASSIGN(URLRequestThrottlerEntryInterface); | 66 DISALLOW_COPY_AND_ASSIGN(URLRequestThrottlerEntryInterface); |
| 69 }; | 67 }; |
| 70 | 68 |
| 71 } // namespace net | 69 } // namespace net |
| 72 | 70 |
| 73 #endif // NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_INTERFACE_H_ | 71 #endif // NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_INTERFACE_H_ |
| OLD | NEW |