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

Side by Side Diff: net/url_request/url_request_throttler_entry_interface.h

Issue 6730034: Remove all "net::" prefixes under net/url_request for code that's (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed indentation Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
11 #include "base/time.h" 11 #include "base/time.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 class URLRequestThrottlerHeaderInterface; 15 class URLRequestThrottlerHeaderInterface;
16 16
17 // Interface provided on entries of the URL request throttler manager. 17 // Interface provided on entries of the URL request throttler manager.
18 class URLRequestThrottlerEntryInterface 18 class URLRequestThrottlerEntryInterface
19 : public base::RefCountedThreadSafe<URLRequestThrottlerEntryInterface> { 19 : public base::RefCountedThreadSafe<URLRequestThrottlerEntryInterface> {
20 public: 20 public:
21 URLRequestThrottlerEntryInterface() {} 21 URLRequestThrottlerEntryInterface() {}
22 22
23 // Returns true when we have encountered server errors and are doing 23 // Returns true when we have encountered server errors and are doing
24 // exponential back-off. 24 // exponential back-off.
25 // net::URLRequestHttpJob checks this method prior to every request; it 25 // URLRequestHttpJob checks this method prior to every request; it
26 // cancels requests if this method returns true. 26 // cancels requests if this method returns true.
27 virtual bool IsDuringExponentialBackoff() const = 0; 27 virtual bool IsDuringExponentialBackoff() const = 0;
28 28
29 // Calculates a recommended sending time for the next request and reserves it. 29 // Calculates a recommended sending time for the next request and reserves it.
30 // The sending time is not earlier than the current exponential back-off 30 // The sending time is not earlier than the current exponential back-off
31 // release time or |earliest_time|. Moreover, the previous results of 31 // release time or |earliest_time|. Moreover, the previous results of
32 // the method are taken into account, in order to make sure they are spread 32 // the method are taken into account, in order to make sure they are spread
33 // properly over time. 33 // properly over time.
34 // Returns the recommended delay before sending the next request, in 34 // Returns the recommended delay before sending the next request, in
35 // milliseconds. The return value is always positive or 0. 35 // milliseconds. The return value is always positive or 0.
(...skipping 20 matching lines...) Expand all
56 virtual ~URLRequestThrottlerEntryInterface() {} 56 virtual ~URLRequestThrottlerEntryInterface() {}
57 57
58 private: 58 private:
59 friend class base::RefCounted<URLRequestThrottlerEntryInterface>; 59 friend class base::RefCounted<URLRequestThrottlerEntryInterface>;
60 DISALLOW_COPY_AND_ASSIGN(URLRequestThrottlerEntryInterface); 60 DISALLOW_COPY_AND_ASSIGN(URLRequestThrottlerEntryInterface);
61 }; 61 };
62 62
63 } // namespace net 63 } // namespace net
64 64
65 #endif // NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_INTERFACE_H_ 65 #endif // NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_INTERFACE_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_job_tracker.h ('k') | net/url_request/url_request_throttler_header_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698