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

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: And fix more stuff... Created 6 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 0357c6ae803236d3f8f44be6cf03843cadd882cd..7ca27f0c5bc35a9df3166c83d379602fecc2360a 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -263,19 +263,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.
mmenke 2014/07/24 16:24:41 Not a huge fan of this behavior, but it matches wh
pauljensen 2014/07/31 15:38:17 Acknowledged.
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
@@ -702,15 +700,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

Powered by Google App Engine
This is Rietveld 408576698