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

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

Issue 1239393003: Refactor main URLRequestContext creation to use URLRequestContextBuilder Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | net/url_request/url_request_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 URLRequestContextStorage;
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:
54 URLRequestContext(); 55 URLRequestContext();
55 virtual ~URLRequestContext(); 56 virtual ~URLRequestContext();
56 57
58 virtual URLRequestContextStorage* storage();
59
57 // Copies the state from |other| into this context. 60 // Copies the state from |other| into this context.
58 void CopyFrom(const URLRequestContext* other); 61 void CopyFrom(const URLRequestContext* other);
59 62
60 // May return nullptr if this context doesn't have an associated network 63 // May return nullptr if this context doesn't have an associated network
61 // session. 64 // session.
62 const HttpNetworkSession::Params* GetNetworkSessionParams() const; 65 const HttpNetworkSession::Params* GetNetworkSessionParams() const;
63 66
64 scoped_ptr<URLRequest> CreateRequest(const GURL& url, 67 scoped_ptr<URLRequest> CreateRequest(const GURL& url,
65 RequestPriority priority, 68 RequestPriority priority,
66 URLRequest::Delegate* delegate) const; 69 URLRequest::Delegate* delegate) const;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // --------------------------------------------------------------------------- 257 // ---------------------------------------------------------------------------
255 258
256 scoped_ptr<std::set<const URLRequest*> > url_requests_; 259 scoped_ptr<std::set<const URLRequest*> > url_requests_;
257 260
258 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); 261 DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
259 }; 262 };
260 263
261 } // namespace net 264 } // namespace net
262 265
263 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 266 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | net/url_request/url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698