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

Side by Side Diff: net/http/http_stream_factory_impl_job.cc

Issue 1127623005: Gather metrics classifying the cause of the TLS fallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fallback-required
Patch Set: missing header Created 5 years, 7 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_factory.h ('k') | net/http/http_stream_factory_impl_request.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 (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 #include "net/http/http_stream_factory_impl_job.h" 5 #include "net/http/http_stream_factory_impl_job.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 22 matching lines...) Expand all
33 #include "net/socket/client_socket_handle.h" 33 #include "net/socket/client_socket_handle.h"
34 #include "net/socket/client_socket_pool.h" 34 #include "net/socket/client_socket_pool.h"
35 #include "net/socket/client_socket_pool_manager.h" 35 #include "net/socket/client_socket_pool_manager.h"
36 #include "net/socket/socks_client_socket_pool.h" 36 #include "net/socket/socks_client_socket_pool.h"
37 #include "net/socket/ssl_client_socket.h" 37 #include "net/socket/ssl_client_socket.h"
38 #include "net/socket/ssl_client_socket_pool.h" 38 #include "net/socket/ssl_client_socket_pool.h"
39 #include "net/spdy/spdy_http_stream.h" 39 #include "net/spdy/spdy_http_stream.h"
40 #include "net/spdy/spdy_session.h" 40 #include "net/spdy/spdy_session.h"
41 #include "net/spdy/spdy_session_pool.h" 41 #include "net/spdy/spdy_session_pool.h"
42 #include "net/ssl/ssl_cert_request_info.h" 42 #include "net/ssl/ssl_cert_request_info.h"
43 #include "net/ssl/ssl_failure_state.h"
43 44
44 namespace net { 45 namespace net {
45 46
46 // Returns parameters associated with the start of a HTTP stream job. 47 // Returns parameters associated with the start of a HTTP stream job.
47 base::Value* NetLogHttpStreamJobCallback( 48 base::Value* NetLogHttpStreamJobCallback(
48 const GURL* original_url, 49 const GURL* original_url,
49 const GURL* url, 50 const GURL* url,
50 const AlternativeService* alternative_service, 51 const AlternativeService* alternative_service,
51 RequestPriority priority, 52 RequestPriority priority,
52 NetLogCaptureMode /* capture_mode */) { 53 NetLogCaptureMode /* capture_mode */) {
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 this, stream_.Pass(), spdy_session, spdy_session_direct_); 358 this, stream_.Pass(), spdy_session, spdy_session_direct_);
358 } 359 }
359 // |this| may be deleted after this call. 360 // |this| may be deleted after this call.
360 } 361 }
361 362
362 void HttpStreamFactoryImpl::Job::OnStreamFailedCallback(int result) { 363 void HttpStreamFactoryImpl::Job::OnStreamFailedCallback(int result) {
363 DCHECK(!IsPreconnecting()); 364 DCHECK(!IsPreconnecting());
364 365
365 MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest(); 366 MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest();
366 367
367 if (IsOrphaned()) 368 if (IsOrphaned()) {
368 stream_factory_->OnOrphanedJobComplete(this); 369 stream_factory_->OnOrphanedJobComplete(this);
369 else 370 } else {
370 request_->OnStreamFailed(this, result, server_ssl_config_); 371 SSLFailureState ssl_failure_state =
372 connection_ ? connection_->ssl_failure_state() : SSL_FAILURE_NONE;
373 request_->OnStreamFailed(this, result, server_ssl_config_,
374 ssl_failure_state);
375 }
371 // |this| may be deleted after this call. 376 // |this| may be deleted after this call.
372 } 377 }
373 378
374 void HttpStreamFactoryImpl::Job::OnCertificateErrorCallback( 379 void HttpStreamFactoryImpl::Job::OnCertificateErrorCallback(
375 int result, const SSLInfo& ssl_info) { 380 int result, const SSLInfo& ssl_info) {
376 DCHECK(!IsPreconnecting()); 381 DCHECK(!IsPreconnecting());
377 382
378 MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest(); 383 MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest();
379 384
380 if (IsOrphaned()) 385 if (IsOrphaned())
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 1533
1529 void HttpStreamFactoryImpl::Job:: 1534 void HttpStreamFactoryImpl::Job::
1530 MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest() { 1535 MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest() {
1531 if (IsOrphaned() || !connection_) 1536 if (IsOrphaned() || !connection_)
1532 return; 1537 return;
1533 1538
1534 request_->AddConnectionAttempts(connection_->connection_attempts()); 1539 request_->AddConnectionAttempts(connection_->connection_attempts());
1535 } 1540 }
1536 1541
1537 } // namespace net 1542 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory.h ('k') | net/http/http_stream_factory_impl_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698