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

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

Issue 1629005: Revert 43826 - HostResolver now adds AI_CANONNAME to the hint flags if a requ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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/proxy/proxy_resolver_js_bindings_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) 2009 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 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 bool MockClientSocket::IsConnected() const { 45 bool MockClientSocket::IsConnected() const {
46 return connected_; 46 return connected_;
47 } 47 }
48 48
49 bool MockClientSocket::IsConnectedAndIdle() const { 49 bool MockClientSocket::IsConnectedAndIdle() const {
50 return connected_; 50 return connected_;
51 } 51 }
52 52
53 int MockClientSocket::GetPeerAddress(AddressList* address) const { 53 int MockClientSocket::GetPeerAddress(AddressList* address) const {
54 return net::SystemHostResolverProc("localhost", ADDRESS_FAMILY_UNSPECIFIED, 54 return net::SystemHostResolverProc("localhost", ADDRESS_FAMILY_UNSPECIFIED,
55 0,
56 address); 55 address);
57 } 56 }
58 57
59 void MockClientSocket::RunCallbackAsync(net::CompletionCallback* callback, 58 void MockClientSocket::RunCallbackAsync(net::CompletionCallback* callback,
60 int result) { 59 int result) {
61 MessageLoop::current()->PostTask(FROM_HERE, 60 MessageLoop::current()->PostTask(FROM_HERE,
62 method_factory_.NewRunnableMethod( 61 method_factory_.NewRunnableMethod(
63 &MockClientSocket::RunCallback, callback, result)); 62 &MockClientSocket::RunCallback, callback, result));
64 } 63 }
65 64
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 503
505 const char kSOCKS5OkRequest[] = 504 const char kSOCKS5OkRequest[] =
506 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; 505 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 };
507 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); 506 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest);
508 507
509 const char kSOCKS5OkResponse[] = 508 const char kSOCKS5OkResponse[] =
510 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; 509 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 };
511 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); 510 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse);
512 511
513 } // namespace net 512 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_js_bindings_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698