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

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

Issue 637733002: Instrumenting read callbacks to find jank in TCPSocketWin::Core::ReadDelegate::OnObjectSignaled (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 | « no previous file | net/socket/tcp_client_socket.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) 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #include <limits> 64 #include <limits>
65 #include <map> 65 #include <map>
66 66
67 #include "base/bind.h" 67 #include "base/bind.h"
68 #include "base/bind_helpers.h" 68 #include "base/bind_helpers.h"
69 #include "base/callback_helpers.h" 69 #include "base/callback_helpers.h"
70 #include "base/compiler_specific.h" 70 #include "base/compiler_specific.h"
71 #include "base/logging.h" 71 #include "base/logging.h"
72 #include "base/memory/singleton.h" 72 #include "base/memory/singleton.h"
73 #include "base/metrics/histogram.h" 73 #include "base/metrics/histogram.h"
74 #include "base/profiler/scoped_profile.h"
74 #include "base/single_thread_task_runner.h" 75 #include "base/single_thread_task_runner.h"
75 #include "base/stl_util.h" 76 #include "base/stl_util.h"
76 #include "base/strings/string_number_conversions.h" 77 #include "base/strings/string_number_conversions.h"
77 #include "base/strings/string_util.h" 78 #include "base/strings/string_util.h"
78 #include "base/strings/stringprintf.h" 79 #include "base/strings/stringprintf.h"
79 #include "base/thread_task_runner_handle.h" 80 #include "base/thread_task_runner_handle.h"
80 #include "base/threading/thread_restrictions.h" 81 #include "base/threading/thread_restrictions.h"
81 #include "base/values.h" 82 #include "base/values.h"
82 #include "crypto/ec_private_key.h" 83 #include "crypto/ec_private_key.h"
83 #include "crypto/nss_util.h" 84 #include "crypto/nss_util.h"
(...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2206 user_read_buf_len_ = 0; 2207 user_read_buf_len_ = 0;
2207 int amount_in_read_buffer = memio_GetReadableBufferSize(nss_bufs_); 2208 int amount_in_read_buffer = memio_GetReadableBufferSize(nss_bufs_);
2208 // This is used to curry the |amount_int_read_buffer| and |user_cb| back to 2209 // This is used to curry the |amount_int_read_buffer| and |user_cb| back to
2209 // the network task runner. 2210 // the network task runner.
2210 PostOrRunCallback( 2211 PostOrRunCallback(
2211 FROM_HERE, 2212 FROM_HERE,
2212 base::Bind(&Core::OnNSSBufferUpdated, this, amount_in_read_buffer)); 2213 base::Bind(&Core::OnNSSBufferUpdated, this, amount_in_read_buffer));
2213 PostOrRunCallback( 2214 PostOrRunCallback(
2214 FROM_HERE, 2215 FROM_HERE,
2215 base::Bind(&Core::DidNSSRead, this, rv)); 2216 base::Bind(&Core::DidNSSRead, this, rv));
2217 // TODO(vadimt): Remove ScopedProfile below once crbug.com/418183 is fixed.
2218 tracked_objects::ScopedProfile tracking_profile(
2219 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2220 "SSLClientSocketNSS::Core::DoReadCallback"));
2216 PostOrRunCallback( 2221 PostOrRunCallback(
2217 FROM_HERE, 2222 FROM_HERE,
2218 base::Bind(base::ResetAndReturn(&user_read_callback_), rv)); 2223 base::Bind(base::ResetAndReturn(&user_read_callback_), rv));
2219 } 2224 }
2220 2225
2221 void SSLClientSocketNSS::Core::DoWriteCallback(int rv) { 2226 void SSLClientSocketNSS::Core::DoWriteCallback(int rv) {
2222 DCHECK(OnNSSTaskRunner()); 2227 DCHECK(OnNSSTaskRunner());
2223 DCHECK_NE(ERR_IO_PENDING, rv); 2228 DCHECK_NE(ERR_IO_PENDING, rv);
2224 DCHECK(!user_write_callback_.is_null()); 2229 DCHECK(!user_write_callback_.is_null());
2225 2230
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after
3523 scoped_refptr<X509Certificate> 3528 scoped_refptr<X509Certificate>
3524 SSLClientSocketNSS::GetUnverifiedServerCertificateChain() const { 3529 SSLClientSocketNSS::GetUnverifiedServerCertificateChain() const {
3525 return core_->state().server_cert.get(); 3530 return core_->state().server_cert.get();
3526 } 3531 }
3527 3532
3528 ChannelIDService* SSLClientSocketNSS::GetChannelIDService() const { 3533 ChannelIDService* SSLClientSocketNSS::GetChannelIDService() const {
3529 return channel_id_service_; 3534 return channel_id_service_;
3530 } 3535 }
3531 3536
3532 } // namespace net 3537 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/socket/tcp_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698