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

Side by Side Diff: net/udp/udp_client_socket.cc

Issue 1541003003: Makes DatagramClientSocket::GetBoundNetwork const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@quicreader
Patch Set: Created 4 years, 12 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
« no previous file with comments | « net/udp/udp_client_socket.h ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/udp/udp_client_socket.h" 5 #include "net/udp/udp_client_socket.h"
6 6
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 #include "net/log/net_log.h" 8 #include "net/log/net_log.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 rv = BindToNetwork(network); 46 rv = BindToNetwork(network);
47 // |network| may have disconnected between the call to GetDefaultNetwork() 47 // |network| may have disconnected between the call to GetDefaultNetwork()
48 // and the call to BindToNetwork(). Loop if this is the case (|rv| will be 48 // and the call to BindToNetwork(). Loop if this is the case (|rv| will be
49 // ERR_NETWORK_CHANGED). 49 // ERR_NETWORK_CHANGED).
50 if (rv != ERR_NETWORK_CHANGED) 50 if (rv != ERR_NETWORK_CHANGED)
51 return rv; 51 return rv;
52 } 52 }
53 return rv; 53 return rv;
54 } 54 }
55 55
56 NetworkChangeNotifier::NetworkHandle UDPClientSocket::GetBoundNetwork() { 56 NetworkChangeNotifier::NetworkHandle UDPClientSocket::GetBoundNetwork() const {
57 return network_; 57 return network_;
58 } 58 }
59 59
60 int UDPClientSocket::Connect(const IPEndPoint& address) { 60 int UDPClientSocket::Connect(const IPEndPoint& address) {
61 int rv = socket_.Open(address.GetFamily()); 61 int rv = socket_.Open(address.GetFamily());
62 if (rv != OK) 62 if (rv != OK)
63 return rv; 63 return rv;
64 return socket_.Connect(address); 64 return socket_.Connect(address);
65 } 65 }
66 66
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 return socket_.NetLog(); 100 return socket_.NetLog();
101 } 101 }
102 102
103 #if defined(OS_WIN) 103 #if defined(OS_WIN)
104 void UDPClientSocket::UseNonBlockingIO() { 104 void UDPClientSocket::UseNonBlockingIO() {
105 socket_.UseNonBlockingIO(); 105 socket_.UseNonBlockingIO();
106 } 106 }
107 #endif 107 #endif
108 108
109 } // namespace net 109 } // namespace net
OLDNEW
« no previous file with comments | « net/udp/udp_client_socket.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698