Index: net/base/net_errors.cc |
diff --git a/net/base/net_errors.cc b/net/base/net_errors.cc |
index a9d1443c913003615f2d4742deb06ecc6bf8d512..27f747bb6b339639eef8e7b243cd9bbb9d6a6112 100644 |
--- a/net/base/net_errors.cc |
+++ b/net/base/net_errors.cc |
@@ -59,4 +59,13 @@ Error FileErrorToNetError(base::File::Error file_error) { |
} |
} |
+int MapSystemErrorWithDefault(int os_error, int default_net_error) { |
+ int net_error = MapSystemError(os_error); |
+ if (net_error != OK) |
+ return net_error; |
+ DLOG(WARNING) << "OS Error was not set meaningfully " << os_error; |
wtc
2014/04/09 15:34:49
Hmm... the problem with this error message is that
|
+ DCHECK_NE(default_net_error, OK); |
wtc
2014/04/09 15:34:49
This DCHECK should be at the beginning of the func
|
+ return default_net_error; |
+} |
+ |
} // namespace net |