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

Unified Diff: net/url_request/url_request.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index b4f2079526129e9af958ca5de1fc256508e15ab3..c649d7cf53bc50b3ebad800b48ae12e22b3c39a8 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -273,19 +273,17 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
virtual ~Delegate() {}
};
- // TODO(tburkard): we should get rid of this constructor, and have each
- // creator of a URLRequest specifically list the cookie store to be used.
- // For now, this constructor will use the cookie store in |context|.
- URLRequest(const GURL& url,
- RequestPriority priority,
- Delegate* delegate,
- const URLRequestContext* context);
-
+ // URLRequests should almost always be created by calling
+ // URLRequestContext::CreateRequest.
+ //
+ // If no cookie store or network delegate are passed in, will use the ones
+ // from the URLRequestContext.
URLRequest(const GURL& url,
RequestPriority priority,
Delegate* delegate,
const URLRequestContext* context,
- CookieStore* cookie_store);
+ CookieStore* cookie_store,
+ NetworkDelegate* network_delegate);
// If destroyed after Start() has been called but while IO is pending,
// then the request will be effectively canceled and the delegate
@@ -721,15 +719,6 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
static void RegisterRequestInterceptor(Interceptor* interceptor);
static void UnregisterRequestInterceptor(Interceptor* interceptor);
- // Initializes the URLRequest. Code shared between the two constructors.
- // TODO(tburkard): This can ultimately be folded into a single constructor
- // again.
- void Init(const GURL& url,
- RequestPriority priotity,
- Delegate* delegate,
- const URLRequestContext* context,
- CookieStore* cookie_store);
-
// Resumes or blocks a request paused by the NetworkDelegate::OnBeforeRequest
// handler. If |blocked| is true, the request is blocked and an error page is
// returned indicating so. This should only be called after Start is called
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698