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

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

Issue 10173005: BackoffEntry: Add the option to always use a delay. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove expects failing on trybots due to roundoff Created 8 years, 7 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) 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_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_H_
6 #define NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 25 matching lines...) Expand all
36 // Sliding window period. 36 // Sliding window period.
37 static const int kDefaultSlidingWindowPeriodMs; 37 static const int kDefaultSlidingWindowPeriodMs;
38 38
39 // Maximum number of requests allowed in sliding window period. 39 // Maximum number of requests allowed in sliding window period.
40 static const int kDefaultMaxSendThreshold; 40 static const int kDefaultMaxSendThreshold;
41 41
42 // Number of initial errors to ignore before starting exponential back-off. 42 // Number of initial errors to ignore before starting exponential back-off.
43 static const int kDefaultNumErrorsToIgnore; 43 static const int kDefaultNumErrorsToIgnore;
44 44
45 // Initial delay for exponential back-off. 45 // Initial delay for exponential back-off.
46 static const int kDefaultInitialBackoffMs; 46 static const int kDefaultInitialDelayMs;
47 47
48 // Factor by which the waiting time will be multiplied. 48 // Factor by which the waiting time will be multiplied.
49 static const double kDefaultMultiplyFactor; 49 static const double kDefaultMultiplyFactor;
50 50
51 // Fuzzing percentage. ex: 10% will spread requests randomly 51 // Fuzzing percentage. ex: 10% will spread requests randomly
52 // between 90%-100% of the calculated time. 52 // between 90%-100% of the calculated time.
53 static const double kDefaultJitterFactor; 53 static const double kDefaultJitterFactor;
54 54
55 // Maximum amount of time we are willing to delay our request. 55 // Maximum amount of time we are willing to delay our request.
56 static const int kDefaultMaximumBackoffMs; 56 static const int kDefaultMaximumBackoffMs;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 std::string url_id_; 180 std::string url_id_;
181 181
182 BoundNetLog net_log_; 182 BoundNetLog net_log_;
183 183
184 DISALLOW_COPY_AND_ASSIGN(URLRequestThrottlerEntry); 184 DISALLOW_COPY_AND_ASSIGN(URLRequestThrottlerEntry);
185 }; 185 };
186 186
187 } // namespace net 187 } // namespace net
188 188
189 #endif // NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_H_ 189 #endif // NET_URL_REQUEST_URL_REQUEST_THROTTLER_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698