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

Side by Side Diff: net/socket/client_socket_pool_base_unittest.cc

Issue 9958028: Add a new GetNegotiatedProtocol method to StreamSocket and implement in all subclasses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/buffered_write_stream_socket.cc ('k') | net/socket/socket_test_util.h » ('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 (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 #include "net/socket/client_socket_pool_base.h" 5 #include "net/socket/client_socket_pool_base.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 virtual bool WasEverUsed() const { 110 virtual bool WasEverUsed() const {
111 return was_used_to_convey_data_ || num_bytes_read_ > 0; 111 return was_used_to_convey_data_ || num_bytes_read_ > 0;
112 } 112 }
113 virtual bool UsingTCPFastOpen() const { return false; } 113 virtual bool UsingTCPFastOpen() const { return false; }
114 virtual int64 NumBytesRead() const { return num_bytes_read_; } 114 virtual int64 NumBytesRead() const { return num_bytes_read_; }
115 virtual base::TimeDelta GetConnectTimeMicros() const { 115 virtual base::TimeDelta GetConnectTimeMicros() const {
116 static const base::TimeDelta kDummyConnectTimeMicros = 116 static const base::TimeDelta kDummyConnectTimeMicros =
117 base::TimeDelta::FromMicroseconds(10); 117 base::TimeDelta::FromMicroseconds(10);
118 return kDummyConnectTimeMicros; // Dummy value. 118 return kDummyConnectTimeMicros; // Dummy value.
119 } 119 }
120 virtual NextProto GetNegotiatedProtocol() const {
121 return kProtoUnknown;
122 }
120 123
121 private: 124 private:
122 bool connected_; 125 bool connected_;
123 BoundNetLog net_log_; 126 BoundNetLog net_log_;
124 bool was_used_to_convey_data_; 127 bool was_used_to_convey_data_;
125 int num_bytes_read_; 128 int num_bytes_read_;
126 129
127 DISALLOW_COPY_AND_ASSIGN(MockClientSocket); 130 DISALLOW_COPY_AND_ASSIGN(MockClientSocket);
128 }; 131 };
129 132
(...skipping 3446 matching lines...) Expand 10 before | Expand all | Expand 10 after
3576 params_, 3579 params_,
3577 kDefaultPriority, 3580 kDefaultPriority,
3578 callback.callback(), 3581 callback.callback(),
3579 pool_.get(), 3582 pool_.get(),
3580 BoundNetLog())); 3583 BoundNetLog()));
3581 } 3584 }
3582 3585
3583 } // namespace 3586 } // namespace
3584 3587
3585 } // namespace net 3588 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/buffered_write_stream_socket.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698