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

Side by Side Diff: net/websockets/websocket_stream.cc

Issue 1003953008: Remove prerender cookie store, part 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-revert-cookie-store-3
Patch Set: rebase (just in case since this is so huge) Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "net/websockets/websocket_stream.h" 5 #include "net/websockets/websocket_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/metrics/sparse_histogram.h" 10 #include "base/metrics/sparse_histogram.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 class StreamRequestImpl : public WebSocketStreamRequest { 81 class StreamRequestImpl : public WebSocketStreamRequest {
82 public: 82 public:
83 StreamRequestImpl( 83 StreamRequestImpl(
84 const GURL& url, 84 const GURL& url,
85 const URLRequestContext* context, 85 const URLRequestContext* context,
86 const url::Origin& origin, 86 const url::Origin& origin,
87 scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate, 87 scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate,
88 scoped_ptr<WebSocketHandshakeStreamCreateHelper> create_helper) 88 scoped_ptr<WebSocketHandshakeStreamCreateHelper> create_helper)
89 : delegate_(new Delegate(this)), 89 : delegate_(new Delegate(this)),
90 url_request_(context->CreateRequest(url, DEFAULT_PRIORITY, 90 url_request_(
91 delegate_.get(), NULL)), 91 context->CreateRequest(url, DEFAULT_PRIORITY, delegate_.get())),
92 connect_delegate_(connect_delegate.Pass()), 92 connect_delegate_(connect_delegate.Pass()),
93 create_helper_(create_helper.release()) { 93 create_helper_(create_helper.release()) {
94 create_helper_->set_failure_message(&failure_message_); 94 create_helper_->set_failure_message(&failure_message_);
95 HttpRequestHeaders headers; 95 HttpRequestHeaders headers;
96 headers.SetHeader(websockets::kUpgrade, websockets::kWebSocketLowercase); 96 headers.SetHeader(websockets::kUpgrade, websockets::kWebSocketLowercase);
97 headers.SetHeader(HttpRequestHeaders::kConnection, websockets::kUpgrade); 97 headers.SetHeader(HttpRequestHeaders::kConnection, websockets::kUpgrade);
98 headers.SetHeader(HttpRequestHeaders::kOrigin, origin.string()); 98 headers.SetHeader(HttpRequestHeaders::kOrigin, origin.string());
99 headers.SetHeader(websockets::kSecWebSocketVersion, 99 headers.SetHeader(websockets::kSecWebSocketVersion,
100 websockets::kSupportedVersion); 100 websockets::kSupportedVersion);
101 url_request_->SetExtraRequestHeaders(headers); 101 url_request_->SetExtraRequestHeaders(headers);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 connect_delegate->OnFinishOpeningHandshake(make_scoped_ptr( 380 connect_delegate->OnFinishOpeningHandshake(make_scoped_ptr(
381 new WebSocketHandshakeResponseInfo(url, 381 new WebSocketHandshakeResponseInfo(url,
382 headers->response_code(), 382 headers->response_code(),
383 headers->GetStatusText(), 383 headers->GetStatusText(),
384 headers, 384 headers,
385 response_time))); 385 response_time)));
386 } 386 }
387 } 387 }
388 388
389 } // namespace net 389 } // namespace net
OLDNEW
« no previous file with comments | « net/websockets/websocket_end_to_end_test.cc ('k') | remoting/host/token_validator_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698