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

Unified Diff: net/websockets/websocket_job.cc

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_request_job.cc ('k') | net/websockets/websocket_job_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_job.cc
===================================================================
--- net/websockets/websocket_job.cc (revision 256594)
+++ net/websockets/websocket_job.cc (working copy)
@@ -36,9 +36,10 @@
};
net::SocketStreamJob* WebSocketJobFactory(
- const GURL& url, net::SocketStream::Delegate* delegate) {
+ const GURL& url, net::SocketStream::Delegate* delegate,
+ net::URLRequestContext* context, net::CookieStore* cookie_store) {
net::WebSocketJob* job = new net::WebSocketJob(delegate);
- job->InitSocketStream(new net::SocketStream(url, job));
+ job->InitSocketStream(new net::SocketStream(url, job, context, cookie_store));
return job;
}
@@ -370,11 +371,11 @@
if (socket_.get() && delegate_ && state_ == CONNECTING) {
handshake_request_->RemoveHeaders(kCookieHeaders,
arraysize(kCookieHeaders));
- if (allow && socket_->context()->cookie_store()) {
+ if (allow && socket_->cookie_store()) {
// Add cookies, including HttpOnly cookies.
CookieOptions cookie_options;
cookie_options.set_include_httponly();
- socket_->context()->cookie_store()->GetCookiesWithOptionsAsync(
+ socket_->cookie_store()->GetCookiesWithOptionsAsync(
GetURLForCookies(), cookie_options,
base::Bind(&WebSocketJob::LoadCookieCallback,
weak_ptr_factory_.GetWeakPtr()));
@@ -505,7 +506,7 @@
callback_pending_ = false;
save_next_cookie_running_ = true;
- if (socket_->context()->cookie_store()) {
+ if (socket_->cookie_store()) {
GURL url_for_cookies = GetURLForCookies();
CookieOptions options;
@@ -526,7 +527,7 @@
continue;
callback_pending_ = true;
- socket_->context()->cookie_store()->SetCookieWithOptionsAsync(
+ socket_->cookie_store()->SetCookieWithOptionsAsync(
url_for_cookies, cookie, options,
base::Bind(&WebSocketJob::OnCookieSaved,
weak_ptr_factory_.GetWeakPtr()));
« no previous file with comments | « net/url_request/url_request_job.cc ('k') | net/websockets/websocket_job_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698