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 error->description = net::ErrorToString(error_code); | |
|
yzshen1
2014/10/07 20:14:34
Maybe we should handle the error_code > 0 case (sa
| |
| 15 return error.Pass(); | |
| 16 } | |
| 17 | |
| 18 } // namespace mojo | |
| OLD | NEW |