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

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

Issue 3091001: Revert 54528 - Digest authentication uses a uri field to prevent replay attac... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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/http/http_network_transaction_unittest.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/socket_test_util.h" 5 #include "net/socket/socket_test_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 10
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 pending_buf_len_(0), 180 pending_buf_len_(0),
181 pending_callback_(NULL) { 181 pending_callback_(NULL) {
182 DCHECK(data_); 182 DCHECK(data_);
183 data_->Reset(); 183 data_->Reset();
184 } 184 }
185 185
186 int MockTCPClientSocket::Connect(net::CompletionCallback* callback) { 186 int MockTCPClientSocket::Connect(net::CompletionCallback* callback) {
187 if (connected_) 187 if (connected_)
188 return net::OK; 188 return net::OK;
189 connected_ = true; 189 connected_ = true;
190 peer_closed_connection_ = false;
191 if (data_->connect_data().async) { 190 if (data_->connect_data().async) {
192 RunCallbackAsync(callback, data_->connect_data().result); 191 RunCallbackAsync(callback, data_->connect_data().result);
193 return net::ERR_IO_PENDING; 192 return net::ERR_IO_PENDING;
194 } 193 }
195 return data_->connect_data().result; 194 return data_->connect_data().result;
196 } 195 }
197 196
198 void MockTCPClientSocket::Disconnect() { 197 void MockTCPClientSocket::Disconnect() {
199 MockClientSocket::Disconnect(); 198 MockClientSocket::Disconnect();
200 pending_callback_ = NULL; 199 pending_callback_ = NULL;
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 894
896 const char kSOCKS5OkRequest[] = 895 const char kSOCKS5OkRequest[] =
897 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; 896 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 };
898 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); 897 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest);
899 898
900 const char kSOCKS5OkResponse[] = 899 const char kSOCKS5OkResponse[] =
901 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; 900 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 };
902 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); 901 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse);
903 902
904 } // namespace net 903 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698