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

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

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 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
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 17 matching lines...) Expand all
28 #include "net/cert/cert_verifier.h" 28 #include "net/cert/cert_verifier.h"
29 #include "net/http/bidirectional_stream_impl.h" 29 #include "net/http/bidirectional_stream_impl.h"
30 #include "net/http/http_basic_stream.h" 30 #include "net/http/http_basic_stream.h"
31 #include "net/http/http_network_session.h" 31 #include "net/http/http_network_session.h"
32 #include "net/http/http_proxy_client_socket.h" 32 #include "net/http/http_proxy_client_socket.h"
33 #include "net/http/http_proxy_client_socket_pool.h" 33 #include "net/http/http_proxy_client_socket_pool.h"
34 #include "net/http/http_request_info.h" 34 #include "net/http/http_request_info.h"
35 #include "net/http/http_server_properties.h" 35 #include "net/http/http_server_properties.h"
36 #include "net/http/http_stream_factory.h" 36 #include "net/http/http_stream_factory.h"
37 #include "net/http/http_stream_factory_impl_request.h" 37 #include "net/http/http_stream_factory_impl_request.h"
38 #include "net/log/net_log.h" 38 #include "net/log/net_log_capture_mode.h"
39 #include "net/log/net_log_event_type.h" 39 #include "net/log/net_log_event_type.h"
40 #include "net/log/net_log_source.h"
40 #include "net/log/net_log_source_type.h" 41 #include "net/log/net_log_source_type.h"
41 #include "net/quic/chromium/quic_http_stream.h" 42 #include "net/quic/chromium/quic_http_stream.h"
42 #include "net/socket/client_socket_handle.h" 43 #include "net/socket/client_socket_handle.h"
43 #include "net/socket/client_socket_pool.h" 44 #include "net/socket/client_socket_pool.h"
44 #include "net/socket/client_socket_pool_manager.h" 45 #include "net/socket/client_socket_pool_manager.h"
45 #include "net/socket/socks_client_socket_pool.h" 46 #include "net/socket/socks_client_socket_pool.h"
46 #include "net/socket/ssl_client_socket.h" 47 #include "net/socket/ssl_client_socket.h"
47 #include "net/socket/ssl_client_socket_pool.h" 48 #include "net/socket/ssl_client_socket_pool.h"
48 #include "net/spdy/bidirectional_stream_spdy_impl.h" 49 #include "net/spdy/bidirectional_stream_spdy_impl.h"
49 #include "net/spdy/spdy_http_stream.h" 50 #include "net/spdy/spdy_http_stream.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 match = MATCH; 110 match = MATCH;
110 } 111 }
111 } 112 }
112 UMA_HISTOGRAM_ENUMERATION("Net.TokenBinding.KeyMatch", match, KEY_MATCH_MAX); 113 UMA_HISTOGRAM_ENUMERATION("Net.TokenBinding.KeyMatch", match, KEY_MATCH_MAX);
113 } 114 }
114 115
115 } // namespace 116 } // namespace
116 117
117 // Returns parameters associated with the start of a HTTP stream job. 118 // Returns parameters associated with the start of a HTTP stream job.
118 std::unique_ptr<base::Value> NetLogHttpStreamJobCallback( 119 std::unique_ptr<base::Value> NetLogHttpStreamJobCallback(
119 const NetLog::Source& source, 120 const NetLogSource& source,
120 const GURL* original_url, 121 const GURL* original_url,
121 const GURL* url, 122 const GURL* url,
122 const AlternativeService* alternative_service, 123 const AlternativeService* alternative_service,
123 RequestPriority priority, 124 RequestPriority priority,
124 NetLogCaptureMode /* capture_mode */) { 125 NetLogCaptureMode /* capture_mode */) {
125 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 126 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
126 if (source.IsValid()) 127 if (source.IsValid())
127 source.AddToEventParameters(dict.get()); 128 source.AddToEventParameters(dict.get());
128 dict->SetString("original_url", original_url->GetOrigin().spec()); 129 dict->SetString("original_url", original_url->GetOrigin().spec());
129 dict->SetString("url", url->GetOrigin().spec()); 130 dict->SetString("url", url->GetOrigin().spec());
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 1501
1501 ConnectionAttempts socket_attempts = connection_->connection_attempts(); 1502 ConnectionAttempts socket_attempts = connection_->connection_attempts();
1502 if (connection_->socket()) { 1503 if (connection_->socket()) {
1503 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1504 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1504 } 1505 }
1505 1506
1506 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); 1507 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts);
1507 } 1508 }
1508 1509
1509 } // namespace net 1510 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698