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

Side by Side Diff: net/ssl/openssl_ssl_util.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 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 unified diff | Download patch
« no previous file with comments | « net/ssl/openssl_client_key_store.cc ('k') | net/ssl/ssl_client_session_cache_openssl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/ssl/openssl_ssl_util.h" 5 #include "net/ssl/openssl_ssl_util.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <openssl/err.h> 8 #include <openssl/err.h>
9 #include <openssl/ssl.h> 9 #include <openssl/ssl.h>
10 #include <utility> 10 #include <utility>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 ERR_GET_REASON(previous) == SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO) { 110 ERR_GET_REASON(previous) == SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO) {
111 return ERR_SSL_VERSION_OR_CIPHER_MISMATCH; 111 return ERR_SSL_VERSION_OR_CIPHER_MISMATCH;
112 } 112 }
113 return ERR_SSL_PROTOCOL_ERROR; 113 return ERR_SSL_PROTOCOL_ERROR;
114 } 114 }
115 default: 115 default:
116 return ERR_SSL_PROTOCOL_ERROR; 116 return ERR_SSL_PROTOCOL_ERROR;
117 } 117 }
118 } 118 }
119 119
120 scoped_ptr<base::Value> NetLogOpenSSLErrorCallback( 120 std::unique_ptr<base::Value> NetLogOpenSSLErrorCallback(
121 int net_error, 121 int net_error,
122 int ssl_error, 122 int ssl_error,
123 const OpenSSLErrorInfo& error_info, 123 const OpenSSLErrorInfo& error_info,
124 NetLogCaptureMode /* capture_mode */) { 124 NetLogCaptureMode /* capture_mode */) {
125 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 125 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
126 dict->SetInteger("net_error", net_error); 126 dict->SetInteger("net_error", net_error);
127 dict->SetInteger("ssl_error", ssl_error); 127 dict->SetInteger("ssl_error", ssl_error);
128 if (error_info.error_code != 0) { 128 if (error_info.error_code != 0) {
129 dict->SetInteger("error_lib", ERR_GET_LIB(error_info.error_code)); 129 dict->SetInteger("error_lib", ERR_GET_LIB(error_info.error_code));
130 dict->SetInteger("error_reason", ERR_GET_REASON(error_info.error_code)); 130 dict->SetInteger("error_reason", ERR_GET_REASON(error_info.error_code));
131 } 131 }
132 if (error_info.file != NULL) 132 if (error_info.file != NULL)
133 dict->SetString("file", error_info.file); 133 dict->SetString("file", error_info.file);
134 if (error_info.line != 0) 134 if (error_info.line != 0)
135 dict->SetInteger("line", error_info.line); 135 dict->SetInteger("line", error_info.line);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 for (size_t i = 0; i < os_handles.size(); i++) { 238 for (size_t i = 0; i < os_handles.size(); i++) {
239 ScopedX509 x509 = OSCertHandleToOpenSSL(os_handles[i]); 239 ScopedX509 x509 = OSCertHandleToOpenSSL(os_handles[i]);
240 if (!x509) 240 if (!x509)
241 return nullptr; 241 return nullptr;
242 sk_X509_push(stack.get(), x509.release()); 242 sk_X509_push(stack.get(), x509.release());
243 } 243 }
244 return stack; 244 return stack;
245 } 245 }
246 246
247 } // namespace net 247 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/openssl_client_key_store.cc ('k') | net/ssl/ssl_client_session_cache_openssl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698