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

Side by Side Diff: components/cast_channel/cast_socket.h

Issue 2093923004: [Cast Channel] Add real SSL tests to CastSocketTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 3 years, 5 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
« no previous file with comments | « no previous file | components/cast_channel/cast_socket_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_CAST_CHANNEL_CAST_SOCKET_H_ 5 #ifndef COMPONENTS_CAST_CHANNEL_CAST_SOCKET_H_
6 #define COMPONENTS_CAST_CHANNEL_CAST_SOCKET_H_ 6 #define COMPONENTS_CAST_CHANNEL_CAST_SOCKET_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 void SetTransportForTesting(std::unique_ptr<CastTransport> transport); 227 void SetTransportForTesting(std::unique_ptr<CastTransport> transport);
228 228
229 // Verifies whether the socket complies with cast channel policy. 229 // Verifies whether the socket complies with cast channel policy.
230 // Audio only channel policy mandates that a device declaring a video out 230 // Audio only channel policy mandates that a device declaring a video out
231 // capability must not have a certificate with audio only policy. 231 // capability must not have a certificate with audio only policy.
232 bool VerifyChannelPolicy(const AuthResult& result); 232 bool VerifyChannelPolicy(const AuthResult& result);
233 233
234 void Connect(); 234 void Connect();
235 235
236 private: 236 private:
237 FRIEND_TEST_ALL_PREFIXES(CastSocketTest, TestConnectAuthMessageCorrupted); 237 FRIEND_TEST_ALL_PREFIXES(MockCastSocketTest, TestObservers);
238 FRIEND_TEST_ALL_PREFIXES(CastSocketTest,
239 TestConnectChallengeReplyReceiveError);
240 FRIEND_TEST_ALL_PREFIXES(CastSocketTest,
241 TestConnectChallengeVerificationFails);
242 FRIEND_TEST_ALL_PREFIXES(CastSocketTest, TestObservers);
243 friend class AuthTransportDelegate; 238 friend class AuthTransportDelegate;
244 friend class CastSocketMessageDelegate;
245 friend class CastSocketTest;
246 friend class TestCastSocket;
247 239
248 void SetErrorState(ChannelError error_state) override; 240 void SetErrorState(ChannelError error_state) override;
249 241
250 // Frees resources and cancels pending callbacks. |ready_state_| will be set 242 // Frees resources and cancels pending callbacks. |ready_state_| will be set
251 // READY_STATE_CLOSED on completion. A no-op if |ready_state_| is already 243 // READY_STATE_CLOSED on completion. A no-op if |ready_state_| is already
252 // READY_STATE_CLOSED. 244 // READY_STATE_CLOSED.
253 void CloseInternal(); 245 void CloseInternal();
254 246
255 // Creates an instance of TCPClientSocket. 247 // Creates an instance of TCPClientSocket.
256 virtual std::unique_ptr<net::TCPClientSocket> CreateTcpSocket(); 248 virtual std::unique_ptr<net::TCPClientSocket> CreateTcpSocket();
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 AuthTransportDelegate* auth_delegate_; 407 AuthTransportDelegate* auth_delegate_;
416 408
417 // List of socket observers. 409 // List of socket observers.
418 base::ObserverList<Observer> observers_; 410 base::ObserverList<Observer> observers_;
419 411
420 DISALLOW_COPY_AND_ASSIGN(CastSocketImpl); 412 DISALLOW_COPY_AND_ASSIGN(CastSocketImpl);
421 }; 413 };
422 } // namespace cast_channel 414 } // namespace cast_channel
423 415
424 #endif // COMPONENTS_CAST_CHANNEL_CAST_SOCKET_H_ 416 #endif // COMPONENTS_CAST_CHANNEL_CAST_SOCKET_H_
OLDNEW
« no previous file with comments | « no previous file | components/cast_channel/cast_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698