Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "mojo/services/network/net_adapters.h" | |
| 6 | |
| 7 #include "net/base/net_errors.h" | |
| 8 | |
| 9 namespace mojo { | |
| 10 | |
| 11 NetworkErrorPtr MakeNetworkError(int error_code) { | |
| 12 NetworkErrorPtr error = NetworkError::New(); | |
| 13 error->code = error_code; | |
| 14 if (error_code < 0) | |
|
yzshen1
2014/10/07 23:51:36
nit: <= 0
| |
| 15 error->description = net::ErrorToString(error_code); | |
| 16 return error.Pass(); | |
| 17 } | |
| 18 | |
| 19 } // namespace mojo | |
| OLD | NEW |