| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/services/network/net_adapters.h" | 5 #include "mojo/services/network/net_adapters.h" |
| 6 | 6 |
| 7 #include <stdint.h> |
| 8 |
| 7 #include <utility> | 9 #include <utility> |
| 8 | 10 |
| 9 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
| 10 | 12 |
| 11 namespace mojo { | 13 namespace mojo { |
| 12 | 14 |
| 13 namespace { | 15 namespace { |
| 14 | 16 |
| 15 const uint32_t kMaxBufSize = 64 * 1024; | 17 const uint32_t kMaxBufSize = 64 * 1024; |
| 16 | 18 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 109 |
| 108 NetworkErrorPtr MakeNetworkError(int error_code) { | 110 NetworkErrorPtr MakeNetworkError(int error_code) { |
| 109 NetworkErrorPtr error = NetworkError::New(); | 111 NetworkErrorPtr error = NetworkError::New(); |
| 110 error->code = error_code; | 112 error->code = error_code; |
| 111 if (error_code <= 0) | 113 if (error_code <= 0) |
| 112 error->description = net::ErrorToString(error_code); | 114 error->description = net::ErrorToString(error_code); |
| 113 return error; | 115 return error; |
| 114 } | 116 } |
| 115 | 117 |
| 116 } // namespace mojo | 118 } // namespace mojo |
| OLD | NEW |