Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "chrome/browser/extensions/api/socket/socket.h" | 5 #include "chrome/browser/extensions/api/socket/socket.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "chrome/browser/extensions/api/api_resource_event_notifier.h" | 8 #include "chrome/browser/extensions/api/api_resource_event_notifier.h" |
| 9 #include "net/base/address_list.h" | 9 #include "net/base/address_list.h" |
| 10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 } | 80 } |
| 81 | 81 |
| 82 bool Socket::SetKeepAlive(bool enable, int delay) { | 82 bool Socket::SetKeepAlive(bool enable, int delay) { |
| 83 return false; | 83 return false; |
| 84 } | 84 } |
| 85 | 85 |
| 86 bool Socket::SetNoDelay(bool no_delay) { | 86 bool Socket::SetNoDelay(bool no_delay) { |
| 87 return false; | 87 return false; |
| 88 } | 88 } |
| 89 | 89 |
| 90 int Socket::Listen(const std::string& address, int port, int backlog, | |
| 91 std::string* error_msg) { | |
| 92 NOTREACHED(); | |
| 93 return net::ERR_NOT_IMPLEMENTED; | |
|
miket_OOO
2012/09/26 17:17:55
See comments in earlier patch. I retract my reques
justinlin
2012/09/26 20:53:12
Done.
| |
| 94 } | |
| 95 | |
| 96 void Socket::Accept(const AcceptCompletionCallback& callback) { | |
| 97 NOTREACHED(); | |
| 98 callback.Run(net::ERR_NOT_IMPLEMENTED, NULL); | |
|
miket_OOO
2012/09/26 17:17:55
Same as above.
justinlin
2012/09/26 20:53:12
Done.
| |
| 99 } | |
| 100 | |
| 90 // static | 101 // static |
| 91 bool Socket::StringAndPortToIPEndPoint(const std::string& ip_address_str, | 102 bool Socket::StringAndPortToIPEndPoint(const std::string& ip_address_str, |
| 92 int port, | 103 int port, |
| 93 net::IPEndPoint* ip_end_point) { | 104 net::IPEndPoint* ip_end_point) { |
| 94 DCHECK(ip_end_point); | 105 DCHECK(ip_end_point); |
| 95 net::IPAddressNumber ip_number; | 106 net::IPAddressNumber ip_number; |
| 96 if (!net::ParseIPLiteralToNumber(ip_address_str, &ip_number)) | 107 if (!net::ParseIPLiteralToNumber(ip_address_str, &ip_number)) |
| 97 return false; | 108 return false; |
| 98 | 109 |
| 99 *ip_end_point = net::IPEndPoint(ip_number, port); | 110 *ip_end_point = net::IPEndPoint(ip_number, port); |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 130 const CompletionCallback& callback) | 141 const CompletionCallback& callback) |
| 131 : io_buffer(io_buffer), | 142 : io_buffer(io_buffer), |
| 132 byte_count(byte_count), | 143 byte_count(byte_count), |
| 133 callback(callback), | 144 callback(callback), |
| 134 bytes_written(0) { | 145 bytes_written(0) { |
| 135 } | 146 } |
| 136 | 147 |
| 137 Socket::WriteRequest::~WriteRequest() { } | 148 Socket::WriteRequest::~WriteRequest() { } |
| 138 | 149 |
| 139 } // namespace extensions | 150 } // namespace extensions |
| OLD | NEW |