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

Side by Side Diff: net/dns/address_sorter_posix_unittest.cc

Issue 227473008: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Original CL, as was submitted, and previously reverted Created 6 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
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/dns/address_sorter_posix.h" 5 #include "net/dns/address_sorter_posix.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/base/net_util.h" 10 #include "net/base/net_util.h"
(...skipping 25 matching lines...) Expand all
36 virtual ~TestUDPClientSocket() {} 36 virtual ~TestUDPClientSocket() {}
37 37
38 virtual int Read(IOBuffer*, int, const CompletionCallback&) OVERRIDE { 38 virtual int Read(IOBuffer*, int, const CompletionCallback&) OVERRIDE {
39 NOTIMPLEMENTED(); 39 NOTIMPLEMENTED();
40 return OK; 40 return OK;
41 } 41 }
42 virtual int Write(IOBuffer*, int, const CompletionCallback&) OVERRIDE { 42 virtual int Write(IOBuffer*, int, const CompletionCallback&) OVERRIDE {
43 NOTIMPLEMENTED(); 43 NOTIMPLEMENTED();
44 return OK; 44 return OK;
45 } 45 }
46 virtual bool SetReceiveBufferSize(int32) OVERRIDE { 46 virtual int SetReceiveBufferSize(int32) OVERRIDE {
47 return true; 47 return OK;
48 } 48 }
49 virtual bool SetSendBufferSize(int32) OVERRIDE { 49 virtual int SetSendBufferSize(int32) OVERRIDE {
50 return true; 50 return OK;
51 } 51 }
52 52
53 virtual void Close() OVERRIDE {} 53 virtual void Close() OVERRIDE {}
54 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE { 54 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE {
55 NOTIMPLEMENTED(); 55 NOTIMPLEMENTED();
56 return OK; 56 return OK;
57 } 57 }
58 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE { 58 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE {
59 if (!connected_) 59 if (!connected_)
60 return ERR_UNEXPECTED; 60 return ERR_UNEXPECTED;
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 AddMapping("4000::1", "4000::10"); // global unicast 318 AddMapping("4000::1", "4000::10"); // global unicast
319 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast 319 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast
320 GetSourceInfo("fe81::20")->deprecated = true; 320 GetSourceInfo("fe81::20")->deprecated = true;
321 const char* addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", "::1", 321 const char* addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", "::1",
322 "8.0.0.1", NULL }; 322 "8.0.0.1", NULL };
323 const int order[] = { 4, 3, 0, 2, 1, -1 }; 323 const int order[] = { 4, 3, 0, 2, 1, -1 };
324 Verify(addresses, order); 324 Verify(addresses, order);
325 } 325 }
326 326
327 } // namespace net 327 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698