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

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

Issue 1153093002: Implement URLRequestBackoffManager for managing Backoff headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 5 years, 5 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
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 // This class represents contextual information (cookies, cache, etc.) 5 // This class represents contextual information (cookies, cache, etc.)
6 // that's useful when processing resource requests. 6 // that's useful when processing resource requests.
7 // The class is reference-counted so that it can be cleaned up after any 7 // The class is reference-counted so that it can be cleaned up after any
8 // requests that are using it have been completed. 8 // requests that are using it have been completed.
9 9
10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
(...skipping 23 matching lines...) Expand all
34 class FraudulentCertificateReporter; 34 class FraudulentCertificateReporter;
35 class HostResolver; 35 class HostResolver;
36 class HttpAuthHandlerFactory; 36 class HttpAuthHandlerFactory;
37 class HttpTransactionFactory; 37 class HttpTransactionFactory;
38 class HttpUserAgentSettings; 38 class HttpUserAgentSettings;
39 class NetworkDelegate; 39 class NetworkDelegate;
40 class NetworkQualityEstimator; 40 class NetworkQualityEstimator;
41 class SdchManager; 41 class SdchManager;
42 class ProxyService; 42 class ProxyService;
43 class URLRequest; 43 class URLRequest;
44 class URLRequestBackoffManager;
44 class URLRequestJobFactory; 45 class URLRequestJobFactory;
45 class URLRequestThrottlerManager; 46 class URLRequestThrottlerManager;
46 47
47 // Subclass to provide application-specific context for URLRequest 48 // Subclass to provide application-specific context for URLRequest
48 // instances. Note that URLRequestContext typically does not provide storage for 49 // instances. Note that URLRequestContext typically does not provide storage for
49 // these member variables, since they may be shared. For the ones that aren't 50 // these member variables, since they may be shared. For the ones that aren't
50 // shared, URLRequestContextStorage can be helpful in defining their storage. 51 // shared, URLRequestContextStorage can be helpful in defining their storage.
51 class NET_EXPORT URLRequestContext 52 class NET_EXPORT URLRequestContext
52 : NON_EXPORTED_BASE(public base::NonThreadSafe) { 53 : NON_EXPORTED_BASE(public base::NonThreadSafe) {
53 public: 54 public:
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 177 }
177 178
178 // May return nullptr. 179 // May return nullptr.
179 URLRequestThrottlerManager* throttler_manager() const { 180 URLRequestThrottlerManager* throttler_manager() const {
180 return throttler_manager_; 181 return throttler_manager_;
181 } 182 }
182 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager) { 183 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager) {
183 throttler_manager_ = throttler_manager; 184 throttler_manager_ = throttler_manager;
184 } 185 }
185 186
187 // May be NULL.
cpu_(ooo_6.6-7.5) 2015/07/17 19:56:01 this comment should be the same style as 179 or 19
xunjieli 2015/07/20 20:02:13 Done.
188 URLRequestBackoffManager* backoff_manager() const { return backoff_manager_; }
189 void set_backoff_manager(URLRequestBackoffManager* backoff_manager) {
190 backoff_manager_ = backoff_manager;
191 }
192
186 // May return nullptr. 193 // May return nullptr.
187 SdchManager* sdch_manager() const { return sdch_manager_; } 194 SdchManager* sdch_manager() const { return sdch_manager_; }
188 void set_sdch_manager(SdchManager* sdch_manager) { 195 void set_sdch_manager(SdchManager* sdch_manager) {
189 sdch_manager_ = sdch_manager; 196 sdch_manager_ = sdch_manager;
190 } 197 }
191 198
192 // Gets the URLRequest objects that hold a reference to this 199 // Gets the URLRequest objects that hold a reference to this
193 // URLRequestContext. 200 // URLRequestContext.
194 std::set<const URLRequest*>* url_requests() const { 201 std::set<const URLRequest*>* url_requests() const {
195 return url_requests_.get(); 202 return url_requests_.get();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 scoped_refptr<SSLConfigService> ssl_config_service_; 245 scoped_refptr<SSLConfigService> ssl_config_service_;
239 NetworkDelegate* network_delegate_; 246 NetworkDelegate* network_delegate_;
240 base::WeakPtr<HttpServerProperties> http_server_properties_; 247 base::WeakPtr<HttpServerProperties> http_server_properties_;
241 HttpUserAgentSettings* http_user_agent_settings_; 248 HttpUserAgentSettings* http_user_agent_settings_;
242 scoped_refptr<CookieStore> cookie_store_; 249 scoped_refptr<CookieStore> cookie_store_;
243 TransportSecurityState* transport_security_state_; 250 TransportSecurityState* transport_security_state_;
244 CTVerifier* cert_transparency_verifier_; 251 CTVerifier* cert_transparency_verifier_;
245 HttpTransactionFactory* http_transaction_factory_; 252 HttpTransactionFactory* http_transaction_factory_;
246 const URLRequestJobFactory* job_factory_; 253 const URLRequestJobFactory* job_factory_;
247 URLRequestThrottlerManager* throttler_manager_; 254 URLRequestThrottlerManager* throttler_manager_;
255 URLRequestBackoffManager* backoff_manager_;
248 SdchManager* sdch_manager_; 256 SdchManager* sdch_manager_;
249 NetworkQualityEstimator* network_quality_estimator_; 257 NetworkQualityEstimator* network_quality_estimator_;
250 258
251 // --------------------------------------------------------------------------- 259 // ---------------------------------------------------------------------------
252 // Important: When adding any new members below, consider whether they need to 260 // Important: When adding any new members below, consider whether they need to
253 // be added to CopyFrom. 261 // be added to CopyFrom.
254 // --------------------------------------------------------------------------- 262 // ---------------------------------------------------------------------------
255 263
256 scoped_ptr<std::set<const URLRequest*> > url_requests_; 264 scoped_ptr<std::set<const URLRequest*> > url_requests_;
257 265
258 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); 266 DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
259 }; 267 };
260 268
261 } // namespace net 269 } // namespace net
262 270
263 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 271 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698