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

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

Issue 2533953005: Standardize "net" category trace events (Closed)
Patch Set: Rebased Created 4 years 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/socket/udp_socket_posix.cc ('k') | net/spdy/spdy_session_pool.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/socket/websocket_transport_client_socket_pool.h" 5 #include "net/socket/websocket_transport_client_socket_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/numerics/safe_conversions.h" 13 #include "base/numerics/safe_conversions.h"
14 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/threading/thread_task_runner_handle.h" 16 #include "base/threading/thread_task_runner_handle.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "base/trace_event/trace_event.h" 18 #include "base/trace_event/trace_event.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "net/base/net_errors.h" 20 #include "net/base/net_errors.h"
21 #include "net/base/trace_constants.h"
21 #include "net/log/net_log_event_type.h" 22 #include "net/log/net_log_event_type.h"
22 #include "net/log/net_log_source.h" 23 #include "net/log/net_log_source.h"
23 #include "net/log/net_log_source_type.h" 24 #include "net/log/net_log_source_type.h"
24 #include "net/socket/client_socket_handle.h" 25 #include "net/socket/client_socket_handle.h"
25 #include "net/socket/client_socket_pool_base.h" 26 #include "net/socket/client_socket_pool_base.h"
26 #include "net/socket/websocket_endpoint_lock_manager.h" 27 #include "net/socket/websocket_endpoint_lock_manager.h"
27 #include "net/socket/websocket_transport_connect_sub_job.h" 28 #include "net/socket/websocket_transport_connect_sub_job.h"
28 29
29 namespace net { 30 namespace net {
30 31
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 connect_timing_.dns_start = base::TimeTicks::Now(); 118 connect_timing_.dns_start = base::TimeTicks::Now();
118 119
119 return resolver_->Resolve( 120 return resolver_->Resolve(
120 params_->destination(), priority(), &addresses_, 121 params_->destination(), priority(), &addresses_,
121 base::Bind(&WebSocketTransportConnectJob::OnIOComplete, 122 base::Bind(&WebSocketTransportConnectJob::OnIOComplete,
122 base::Unretained(this)), 123 base::Unretained(this)),
123 &request_, net_log()); 124 &request_, net_log());
124 } 125 }
125 126
126 int WebSocketTransportConnectJob::DoResolveHostComplete(int result) { 127 int WebSocketTransportConnectJob::DoResolveHostComplete(int result) {
127 TRACE_EVENT0("net", "WebSocketTransportConnectJob::DoResolveHostComplete"); 128 TRACE_EVENT0(kNetTracingCategory,
129 "WebSocketTransportConnectJob::DoResolveHostComplete");
128 connect_timing_.dns_end = base::TimeTicks::Now(); 130 connect_timing_.dns_end = base::TimeTicks::Now();
129 // Overwrite connection start time, since for connections that do not go 131 // Overwrite connection start time, since for connections that do not go
130 // through proxies, |connect_start| should not include dns lookup time. 132 // through proxies, |connect_start| should not include dns lookup time.
131 connect_timing_.connect_start = connect_timing_.dns_end; 133 connect_timing_.connect_start = connect_timing_.dns_end;
132 134
133 if (result != OK) 135 if (result != OK)
134 return result; 136 return result;
135 137
136 // Invoke callback, and abort if it fails. 138 // Invoke callback, and abort if it fails.
137 if (!params_->host_resolution_callback().is_null()) { 139 if (!params_->host_resolution_callback().is_null()) {
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 handle(handle), 697 handle(handle),
696 callback(callback), 698 callback(callback),
697 net_log(net_log) {} 699 net_log(net_log) {}
698 700
699 WebSocketTransportClientSocketPool::StalledRequest::StalledRequest( 701 WebSocketTransportClientSocketPool::StalledRequest::StalledRequest(
700 const StalledRequest& other) = default; 702 const StalledRequest& other) = default;
701 703
702 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {} 704 WebSocketTransportClientSocketPool::StalledRequest::~StalledRequest() {}
703 705
704 } // namespace net 706 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/udp_socket_posix.cc ('k') | net/spdy/spdy_session_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698