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

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

Issue 652853002: Adding instrumentation to locate the source of jankiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/http/http_stream_parser.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 2610 matching lines...) Expand 10 before | Expand all | Expand 10 after
2621 DCHECK(nss_waiting_write_); 2621 DCHECK(nss_waiting_write_);
2622 nss_waiting_write_ = false; 2622 nss_waiting_write_ = false;
2623 if (result < 0) { 2623 if (result < 0) {
2624 nss_is_closed_ = true; 2624 nss_is_closed_ = true;
2625 } else if (result > 0) { 2625 } else if (result > 0) {
2626 was_ever_used_ = true; 2626 was_ever_used_ = true;
2627 } 2627 }
2628 } 2628 }
2629 2629
2630 void SSLClientSocketNSS::Core::BufferSendComplete(int result) { 2630 void SSLClientSocketNSS::Core::BufferSendComplete(int result) {
2631 // TODO(vadimt): Remove ScopedProfile below once crbug.com/418183 is fixed.
2632 tracked_objects::ScopedProfile tracking_profile(
2633 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2634 "418183 DidCompleteReadWrite => Core::BufferSendComplete"));
2635
2631 if (!OnNSSTaskRunner()) { 2636 if (!OnNSSTaskRunner()) {
2632 if (detached_) 2637 if (detached_)
2633 return; 2638 return;
2634 2639
2635 nss_task_runner_->PostTask( 2640 nss_task_runner_->PostTask(
2636 FROM_HERE, base::Bind(&Core::BufferSendComplete, this, result)); 2641 FROM_HERE, base::Bind(&Core::BufferSendComplete, this, result));
2637 return; 2642 return;
2638 } 2643 }
2639 2644
2640 DCHECK(OnNSSTaskRunner()); 2645 DCHECK(OnNSSTaskRunner());
(...skipping 23 matching lines...) Expand all
2664 void SSLClientSocketNSS::Core::OnGetChannelIDComplete(int result) { 2669 void SSLClientSocketNSS::Core::OnGetChannelIDComplete(int result) {
2665 DVLOG(1) << __FUNCTION__ << " " << result; 2670 DVLOG(1) << __FUNCTION__ << " " << result;
2666 DCHECK(OnNetworkTaskRunner()); 2671 DCHECK(OnNetworkTaskRunner());
2667 2672
2668 OnHandshakeIOComplete(result); 2673 OnHandshakeIOComplete(result);
2669 } 2674 }
2670 2675
2671 void SSLClientSocketNSS::Core::BufferRecvComplete( 2676 void SSLClientSocketNSS::Core::BufferRecvComplete(
2672 IOBuffer* read_buffer, 2677 IOBuffer* read_buffer,
2673 int result) { 2678 int result) {
2679 // TODO(vadimt): Remove ScopedProfile below once crbug.com/418183 is fixed.
2680 tracked_objects::ScopedProfile tracking_profile(
2681 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2682 "418183 DidCompleteReadWrite => SSLClientSocketNSS::Core::..."));
2683
2674 DCHECK(read_buffer); 2684 DCHECK(read_buffer);
2675 2685
2676 if (!OnNSSTaskRunner()) { 2686 if (!OnNSSTaskRunner()) {
2677 if (detached_) 2687 if (detached_)
2678 return; 2688 return;
2679 2689
2680 nss_task_runner_->PostTask( 2690 nss_task_runner_->PostTask(
2681 FROM_HERE, base::Bind(&Core::BufferRecvComplete, this, 2691 FROM_HERE, base::Bind(&Core::BufferRecvComplete, this,
2682 scoped_refptr<IOBuffer>(read_buffer), result)); 2692 scoped_refptr<IOBuffer>(read_buffer), result));
2683 return; 2693 return;
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
3528 scoped_refptr<X509Certificate> 3538 scoped_refptr<X509Certificate>
3529 SSLClientSocketNSS::GetUnverifiedServerCertificateChain() const { 3539 SSLClientSocketNSS::GetUnverifiedServerCertificateChain() const {
3530 return core_->state().server_cert.get(); 3540 return core_->state().server_cert.get();
3531 } 3541 }
3532 3542
3533 ChannelIDService* SSLClientSocketNSS::GetChannelIDService() const { 3543 ChannelIDService* SSLClientSocketNSS::GetChannelIDService() const {
3534 return channel_id_service_; 3544 return channel_id_service_;
3535 } 3545 }
3536 3546
3537 } // namespace net 3547 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698