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

Unified Diff: net/socket/ssl_client_socket_mac.cc

Issue 515049: Changed catch-all Mac SSL OSStatus error to paramErr (Closed)
Patch Set: Added needed incldue. Created 10 years, 12 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_mac.cc
diff --git a/net/socket/ssl_client_socket_mac.cc b/net/socket/ssl_client_socket_mac.cc
index 4bc6ae804925e94e4afb2a2c741842e3b6f8c7c2..4931742985e8179bb7b4d00611055d169a78ec55 100644
--- a/net/socket/ssl_client_socket_mac.cc
+++ b/net/socket/ssl_client_socket_mac.cc
@@ -4,6 +4,8 @@
#include "net/socket/ssl_client_socket_mac.h"
+#include <CoreServices/CoreServices.h>
+
#include "base/scoped_cftyperef.h"
#include "base/singleton.h"
#include "base/string_util.h"
@@ -118,6 +120,7 @@ int NetErrorFromOSStatus(OSStatus status) {
case errSSLClosedAbort:
return ERR_CONNECTION_ABORTED;
case errSSLInternal:
+ return ERR_UNEXPECTED;
case errSSLCrypto:
case errSSLFatalAlert:
case errSSLIllegalParam: // Received an illegal_parameter alert.
@@ -170,12 +173,16 @@ OSStatus OSStatusFromNetError(int net_error) {
case ERR_ADDRESS_UNREACHABLE:
case ERR_ADDRESS_INVALID:
return errSSLClosedAbort;
+ case ERR_UNEXPECTED:
+ return errSSLInternal;
+ case ERR_INVALID_ARGUMENT:
+ return paramErr;
case OK:
return noErr;
default:
LOG(WARNING) << "Unknown error " << net_error <<
- " mapped to errSSLIllegalParam";
- return errSSLIllegalParam;
+ " mapped to paramErr";
+ return paramErr;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698