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

Side by Side Diff: net/socket/socket_test_util.h

Issue 1579063002: Implement a skeleton version of Expect CT reports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 NET_SOCKET_SOCKET_TEST_UTIL_H_ 5 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_
6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 MockConnect connect; 351 MockConnect connect;
352 SSLClientSocket::NextProtoStatus next_proto_status; 352 SSLClientSocket::NextProtoStatus next_proto_status;
353 std::string next_proto; 353 std::string next_proto;
354 NextProtoVector next_protos_expected_in_ssl_config; 354 NextProtoVector next_protos_expected_in_ssl_config;
355 bool client_cert_sent; 355 bool client_cert_sent;
356 SSLCertRequestInfo* cert_request_info; 356 SSLCertRequestInfo* cert_request_info;
357 scoped_refptr<X509Certificate> cert; 357 scoped_refptr<X509Certificate> cert;
358 bool channel_id_sent; 358 bool channel_id_sent;
359 ChannelIDService* channel_id_service; 359 ChannelIDService* channel_id_service;
360 int connection_status; 360 int connection_status;
361 CertStatus cert_status;
361 }; 362 };
362 363
363 // Uses the sequence_number field in the mock reads and writes to 364 // Uses the sequence_number field in the mock reads and writes to
364 // complete the operations in a specified order. 365 // complete the operations in a specified order.
365 class SequencedSocketData : public SocketDataProvider { 366 class SequencedSocketData : public SocketDataProvider {
366 public: 367 public:
367 // |reads| is the list of MockRead completions. 368 // |reads| is the list of MockRead completions.
368 // |writes| is the list of MockWrite completions. 369 // |writes| is the list of MockWrite completions.
369 SequencedSocketData(MockRead* reads, 370 SequencedSocketData(MockRead* reads,
370 size_t reads_count, 371 size_t reads_count,
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 988
988 // Helper function to get the total data size of the MockReads in |reads|. 989 // Helper function to get the total data size of the MockReads in |reads|.
989 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); 990 int64_t CountReadBytes(const MockRead reads[], size_t reads_size);
990 991
991 // Helper function to get the total data size of the MockWrites in |writes|. 992 // Helper function to get the total data size of the MockWrites in |writes|.
992 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); 993 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size);
993 994
994 } // namespace net 995 } // namespace net
995 996
996 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ 997 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698