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

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

Issue 14125003: Do not roll back to SSL 3.0 for Google properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup before sending for reviews. Created 7 years, 8 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 <cstring> 8 #include <cstring>
9 #include <deque> 9 #include <deque>
10 #include <string> 10 #include <string>
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 }; 512 };
513 513
514 // Holds an array of SocketDataProvider elements. As Mock{TCP,SSL}StreamSocket 514 // Holds an array of SocketDataProvider elements. As Mock{TCP,SSL}StreamSocket
515 // objects get instantiated, they take their data from the i'th element of this 515 // objects get instantiated, they take their data from the i'th element of this
516 // array. 516 // array.
517 template<typename T> 517 template<typename T>
518 class SocketDataProviderArray { 518 class SocketDataProviderArray {
519 public: 519 public:
520 SocketDataProviderArray() : next_index_(0) {} 520 SocketDataProviderArray() : next_index_(0) {}
521 521
522 size_t next_index() { return next_index_; }
wtc 2013/04/17 19:49:50 Nit: move this getter method to be next to the rel
thaidn_google 2013/04/17 22:16:07 Done.
523
522 T* GetNext() { 524 T* GetNext() {
523 DCHECK_LT(next_index_, data_providers_.size()); 525 DCHECK_LT(next_index_, data_providers_.size());
524 return data_providers_[next_index_++]; 526 return data_providers_[next_index_++];
525 } 527 }
526 528
527 void Add(T* data_provider) { 529 void Add(T* data_provider) {
528 DCHECK(data_provider); 530 DCHECK(data_provider);
529 data_providers_.push_back(data_provider); 531 data_providers_.push_back(data_provider);
530 } 532 }
531 533
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 1069
1068 extern const char kSOCKS5OkRequest[]; 1070 extern const char kSOCKS5OkRequest[];
1069 extern const int kSOCKS5OkRequestLength; 1071 extern const int kSOCKS5OkRequestLength;
1070 1072
1071 extern const char kSOCKS5OkResponse[]; 1073 extern const char kSOCKS5OkResponse[];
1072 extern const int kSOCKS5OkResponseLength; 1074 extern const int kSOCKS5OkResponseLength;
1073 1075
1074 } // namespace net 1076 } // namespace net
1075 1077
1076 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ 1078 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698