summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-06 21:13:31 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-06 21:13:31 +0000
commit6d8e2a64b6961331816689850192a8ee864f9a97 (patch)
tree6b9d8022083bbad17acd221e71398cb2141f4544
parent0033cc6fe696a94e6fcaafe4ba5d3d1fcb4421cb (diff)
downloadchromium_src-6d8e2a64b6961331816689850192a8ee864f9a97.zip
chromium_src-6d8e2a64b6961331816689850192a8ee864f9a97.tar.gz
chromium_src-6d8e2a64b6961331816689850192a8ee864f9a97.tar.bz2
Changed catch-all Mac SSL OSStatus error to paramErr.
Added net::ERR_UNEXPECTED <=> errSSLInternal mapping. Added net::ERR_INVALID_ARGUMENT => paramErr mapping. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/515049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35650 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/socket/ssl_client_socket_mac.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/socket/ssl_client_socket_mac.cc b/net/socket/ssl_client_socket_mac.cc
index 4bc6ae8..4931742 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;
}
}