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

Side by Side Diff: net/socket/ssl_client_socket_nss.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_client_socket_mac.cc ('k') | net/socket/ssl_client_socket_unittest.cc » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived 5 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived
6 // from AuthCertificateCallback() in 6 // from AuthCertificateCallback() in
7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. 7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp.
8 8
9 /* ***** BEGIN LICENSE BLOCK ***** 9 /* ***** BEGIN LICENSE BLOCK *****
10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 const char* buf2; 1404 const char* buf2;
1405 unsigned int len1, len2; 1405 unsigned int len1, len2;
1406 memio_GetWriteParams(nss_bufs_, &buf1, &len1, &buf2, &len2); 1406 memio_GetWriteParams(nss_bufs_, &buf1, &len1, &buf2, &len2);
1407 const unsigned int len = len1 + len2; 1407 const unsigned int len = len1 + len2;
1408 1408
1409 if (corked_ && len < kRecvBufferSize / 2) 1409 if (corked_ && len < kRecvBufferSize / 2)
1410 return 0; 1410 return 0;
1411 1411
1412 int rv = 0; 1412 int rv = 0;
1413 if (len) { 1413 if (len) {
1414 scoped_refptr<IOBuffer> send_buffer = new IOBuffer(len); 1414 scoped_refptr<IOBuffer> send_buffer(new IOBuffer(len));
1415 memcpy(send_buffer->data(), buf1, len1); 1415 memcpy(send_buffer->data(), buf1, len1);
1416 memcpy(send_buffer->data() + len1, buf2, len2); 1416 memcpy(send_buffer->data() + len1, buf2, len2);
1417 rv = transport_->socket()->Write(send_buffer, len, 1417 rv = transport_->socket()->Write(send_buffer, len,
1418 &buffer_send_callback_); 1418 &buffer_send_callback_);
1419 if (rv == ERR_IO_PENDING) { 1419 if (rv == ERR_IO_PENDING) {
1420 transport_send_busy_ = true; 1420 transport_send_busy_ = true;
1421 } else { 1421 } else {
1422 memio_PutWriteResult(nss_bufs_, MapErrorToNSS(rv)); 1422 memio_PutWriteResult(nss_bufs_, MapErrorToNSS(rv));
1423 } 1423 }
1424 } 1424 }
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 case SSL_CONNECTION_VERSION_TLS1_1: 2353 case SSL_CONNECTION_VERSION_TLS1_1:
2354 UpdateConnectionTypeHistograms(CONNECTION_SSL_TLS1_1); 2354 UpdateConnectionTypeHistograms(CONNECTION_SSL_TLS1_1);
2355 break; 2355 break;
2356 case SSL_CONNECTION_VERSION_TLS1_2: 2356 case SSL_CONNECTION_VERSION_TLS1_2:
2357 UpdateConnectionTypeHistograms(CONNECTION_SSL_TLS1_2); 2357 UpdateConnectionTypeHistograms(CONNECTION_SSL_TLS1_2);
2358 break; 2358 break;
2359 }; 2359 };
2360 } 2360 }
2361 2361
2362 } // namespace net 2362 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_mac.cc ('k') | net/socket/ssl_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698