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

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

Issue 407093011: Allow URLRequests from one context to have different NetworkDelegates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new tests Created 6 years, 4 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
« no previous file with comments | « net/url_request/url_request.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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 public: 52 public:
53 URLRequestContext(); 53 URLRequestContext();
54 virtual ~URLRequestContext(); 54 virtual ~URLRequestContext();
55 55
56 // Copies the state from |other| into this context. 56 // Copies the state from |other| into this context.
57 void CopyFrom(const URLRequestContext* other); 57 void CopyFrom(const URLRequestContext* other);
58 58
59 // May return NULL if this context doesn't have an associated network session. 59 // May return NULL if this context doesn't have an associated network session.
60 const HttpNetworkSession::Params* GetNetworkSessionParams() const; 60 const HttpNetworkSession::Params* GetNetworkSessionParams() const;
61 61
62 // Creates a URLRequest. |cookie_store| optionally specifies a cookie store 62 // Creates a URLRequest. If |cookie_store| is non-NULL, it will be used
63 // to be used rather than the one represented by the context, or NULL 63 // instead of the context's cookie store.
64 // otherwise.
65 scoped_ptr<URLRequest> CreateRequest(const GURL& url, 64 scoped_ptr<URLRequest> CreateRequest(const GURL& url,
66 RequestPriority priority, 65 RequestPriority priority,
67 URLRequest::Delegate* delegate, 66 URLRequest::Delegate* delegate,
68 CookieStore* cookie_store) const; 67 CookieStore* cookie_store) const;
69 68
70 NetLog* net_log() const { 69 NetLog* net_log() const {
71 return net_log_; 70 return net_log_;
72 } 71 }
73 72
74 void set_net_log(NetLog* net_log) { 73 void set_net_log(NetLog* net_log) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // --------------------------------------------------------------------------- 246 // ---------------------------------------------------------------------------
248 247
249 scoped_ptr<std::set<const URLRequest*> > url_requests_; 248 scoped_ptr<std::set<const URLRequest*> > url_requests_;
250 249
251 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); 250 DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
252 }; 251 };
253 252
254 } // namespace net 253 } // namespace net
255 254
256 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 255 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698