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

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

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: one more fix, content bound_net_log_ Created 4 years, 2 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_channel.h" 5 #include "net/websockets/websocket_channel.h"
6 6
7 #include <limits.h> // for INT_MAX 7 #include <limits.h> // for INT_MAX
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 return; 579 return;
580 } 580 }
581 socket_url_ = socket_url; 581 socket_url_ = socket_url;
582 std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate( 582 std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate(
583 new ConnectDelegate(this)); 583 new ConnectDelegate(this));
584 std::unique_ptr<WebSocketHandshakeStreamCreateHelper> create_helper( 584 std::unique_ptr<WebSocketHandshakeStreamCreateHelper> create_helper(
585 new WebSocketHandshakeStreamCreateHelper(connect_delegate.get(), 585 new WebSocketHandshakeStreamCreateHelper(connect_delegate.get(),
586 requested_subprotocols)); 586 requested_subprotocols));
587 stream_request_ = callback.Run(socket_url_, std::move(create_helper), origin, 587 stream_request_ = callback.Run(socket_url_, std::move(create_helper), origin,
588 first_party_for_cookies, additional_headers, 588 first_party_for_cookies, additional_headers,
589 url_request_context_, BoundNetLog(), 589 url_request_context_, NetLogWithSource(),
590 std::move(connect_delegate)); 590 std::move(connect_delegate));
591 SetState(CONNECTING); 591 SetState(CONNECTING);
592 } 592 }
593 593
594 void WebSocketChannel::OnConnectSuccess( 594 void WebSocketChannel::OnConnectSuccess(
595 std::unique_ptr<WebSocketStream> stream) { 595 std::unique_ptr<WebSocketStream> stream) {
596 DCHECK(stream); 596 DCHECK(stream);
597 DCHECK_EQ(CONNECTING, state_); 597 DCHECK_EQ(CONNECTING, state_);
598 598
599 stream_ = std::move(stream); 599 stream_ = std::move(stream);
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 } 1181 }
1182 1182
1183 void WebSocketChannel::CloseTimeout() { 1183 void WebSocketChannel::CloseTimeout() {
1184 stream_->Close(); 1184 stream_->Close();
1185 SetState(CLOSED); 1185 SetState(CLOSED);
1186 DoDropChannel(false, kWebSocketErrorAbnormalClosure, ""); 1186 DoDropChannel(false, kWebSocketErrorAbnormalClosure, "");
1187 // |this| has been deleted. 1187 // |this| has been deleted.
1188 } 1188 }
1189 1189
1190 } // namespace net 1190 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698