OLD | NEW |
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> | 7 #include <limits.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <iostream> | 10 #include <iostream> |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 ChannelState OnStartOpeningHandshake( | 166 ChannelState OnStartOpeningHandshake( |
167 scoped_ptr<WebSocketHandshakeRequestInfo>) override { | 167 scoped_ptr<WebSocketHandshakeRequestInfo>) override { |
168 OnStartOpeningHandshakeCalled(); | 168 OnStartOpeningHandshakeCalled(); |
169 return CHANNEL_ALIVE; | 169 return CHANNEL_ALIVE; |
170 } | 170 } |
171 ChannelState OnFinishOpeningHandshake( | 171 ChannelState OnFinishOpeningHandshake( |
172 scoped_ptr<WebSocketHandshakeResponseInfo>) override { | 172 scoped_ptr<WebSocketHandshakeResponseInfo>) override { |
173 OnFinishOpeningHandshakeCalled(); | 173 OnFinishOpeningHandshakeCalled(); |
174 return CHANNEL_ALIVE; | 174 return CHANNEL_ALIVE; |
175 } | 175 } |
176 virtual ChannelState OnSSLCertificateError( | 176 ChannelState OnSSLCertificateError( |
177 scoped_ptr<SSLErrorCallbacks> ssl_error_callbacks, | 177 scoped_ptr<SSLErrorCallbacks> ssl_error_callbacks, |
178 const GURL& url, | 178 const GURL& url, |
179 const SSLInfo& ssl_info, | 179 const SSLInfo& ssl_info, |
180 bool fatal) override { | 180 bool fatal) override { |
181 OnSSLCertificateErrorCalled( | 181 OnSSLCertificateErrorCalled( |
182 ssl_error_callbacks.get(), url, ssl_info, fatal); | 182 ssl_error_callbacks.get(), url, ssl_info, fatal); |
183 return CHANNEL_ALIVE; | 183 return CHANNEL_ALIVE; |
184 } | 184 } |
185 | 185 |
186 MOCK_METHOD0(OnStartOpeningHandshakeCalled, void()); // NOLINT | 186 MOCK_METHOD0(OnStartOpeningHandshakeCalled, void()); // NOLINT |
(...skipping 3225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3412 channel_->StartClosingHandshake(kWebSocketNormalClosure, "OK"); | 3412 channel_->StartClosingHandshake(kWebSocketNormalClosure, "OK"); |
3413 ASSERT_TRUE(read_frames); | 3413 ASSERT_TRUE(read_frames); |
3414 // Provide the "Close" message from the server. | 3414 // Provide the "Close" message from the server. |
3415 *read_frames = CreateFrameVector(frames); | 3415 *read_frames = CreateFrameVector(frames); |
3416 read_callback.Run(OK); | 3416 read_callback.Run(OK); |
3417 completion.WaitForResult(); | 3417 completion.WaitForResult(); |
3418 } | 3418 } |
3419 | 3419 |
3420 } // namespace | 3420 } // namespace |
3421 } // namespace net | 3421 } // namespace net |
OLD | NEW |