Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: net/base/net_errors.cc

Issue 227473008: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux typo Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698