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

Unified Diff: net/url_request/url_request.h

Issue 197043005: original change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix other build error Created 6 years, 9 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/url_request/url_fetcher_core.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
===================================================================
--- net/url_request/url_request.h (revision 256594)
+++ net/url_request/url_request.h (working copy)
@@ -25,6 +25,7 @@
#include "net/base/request_priority.h"
#include "net/base/upload_progress.h"
#include "net/cookies/canonical_cookie.h"
+#include "net/cookies/cookie_store.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_response_info.h"
#include "net/url_request/url_request_status.h"
@@ -291,11 +292,20 @@
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);
+ URLRequest(const GURL& url,
+ RequestPriority priority,
+ Delegate* delegate,
+ const URLRequestContext* context,
+ CookieStore* cookie_store);
+
// If destroyed after Start() has been called but while IO is pending,
// then the request will be effectively canceled and the delegate
// will not have any more of its methods called.
@@ -691,6 +701,8 @@
// Allow the URLRequestJob class to set our status too
void set_status(const URLRequestStatus& value) { status_ = value; }
+ CookieStore* cookie_store() const { return cookie_store_; }
+
// Allow the URLRequestJob to redirect this request. Returns OK if
// successful, otherwise an error code is returned.
int Redirect(const GURL& location, int http_status_code);
@@ -730,6 +742,15 @@
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
@@ -895,6 +916,9 @@
// Keeps track of whether or not OnBeforeNetworkStart has been called yet.
bool notified_before_network_start_;
+ // The cookie store to be used for this request.
+ scoped_refptr<CookieStore> cookie_store_;
+
DISALLOW_COPY_AND_ASSIGN(URLRequest);
};
« no previous file with comments | « net/url_request/url_fetcher_core.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698