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

Side by Side Diff: net/proxy/proxy_resolver_v8_tracing.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/nqe/network_quality_estimator.cc ('k') | net/quic/chromium/quic_stream_factory.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/proxy/proxy_resolver_v8_tracing.h" 5 #include "net/proxy/proxy_resolver_v8_tracing.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
15 #include "base/single_thread_task_runner.h" 15 #include "base/single_thread_task_runner.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
17 #include "base/synchronization/cancellation_flag.h" 17 #include "base/synchronization/cancellation_flag.h"
18 #include "base/synchronization/waitable_event.h" 18 #include "base/synchronization/waitable_event.h"
19 #include "base/threading/thread.h" 19 #include "base/threading/thread.h"
20 #include "base/threading/thread_restrictions.h" 20 #include "base/threading/thread_restrictions.h"
21 #include "base/threading/thread_task_runner_handle.h" 21 #include "base/threading/thread_task_runner_handle.h"
22 #include "base/trace_event/trace_event.h" 22 #include "base/trace_event/trace_event.h"
23 #include "net/base/address_list.h" 23 #include "net/base/address_list.h"
24 #include "net/base/net_errors.h" 24 #include "net/base/net_errors.h"
25 #include "net/base/network_interfaces.h" 25 #include "net/base/network_interfaces.h"
26 #include "net/base/trace_constants.h"
26 #include "net/dns/host_resolver.h" 27 #include "net/dns/host_resolver.h"
27 #include "net/log/net_log_with_source.h" 28 #include "net/log/net_log_with_source.h"
28 #include "net/proxy/proxy_info.h" 29 #include "net/proxy/proxy_info.h"
29 #include "net/proxy/proxy_resolver_error_observer.h" 30 #include "net/proxy/proxy_resolver_error_observer.h"
30 #include "net/proxy/proxy_resolver_v8.h" 31 #include "net/proxy/proxy_resolver_v8.h"
31 32
32 // The intent of this class is explained in the design document: 33 // The intent of this class is explained in the design document:
33 // https://docs.google.com/a/chromium.org/document/d/16Ij5OcVnR3s0MH4Z5XkhI9VTPo MJdaBn9rKreAmGOdE/edit 34 // https://docs.google.com/a/chromium.org/document/d/16Ij5OcVnR3s0MH4Z5XkhI9VTPo MJdaBn9rKreAmGOdE/edit
34 // 35 //
35 // In a nutshell, PAC scripts are Javascript programs and may depend on 36 // In a nutshell, PAC scripts are Javascript programs and may depend on
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 return; 556 return;
556 } 557 }
557 558
558 if (abandoned_) 559 if (abandoned_)
559 return; 560 return;
560 561
561 NotifyCaller(result); 562 NotifyCaller(result);
562 } 563 }
563 564
564 int Job::ExecuteProxyResolver() { 565 int Job::ExecuteProxyResolver() {
565 TRACE_EVENT0("net", "Job::ExecuteProxyResolver"); 566 TRACE_EVENT0(kNetTracingCategory, "Job::ExecuteProxyResolver");
566 int result = ERR_UNEXPECTED; // Initialized to silence warnings. 567 int result = ERR_UNEXPECTED; // Initialized to silence warnings.
567 568
568 switch (operation_) { 569 switch (operation_) {
569 case CREATE_V8_RESOLVER: { 570 case CREATE_V8_RESOLVER: {
570 std::unique_ptr<ProxyResolverV8> resolver; 571 std::unique_ptr<ProxyResolverV8> resolver;
571 result = ProxyResolverV8::Create(script_data_, this, &resolver); 572 result = ProxyResolverV8::Create(script_data_, this, &resolver);
572 if (result == OK) 573 if (result == OK)
573 *resolver_out_ = std::move(resolver); 574 *resolver_out_ = std::move(resolver);
574 break; 575 break;
575 } 576 }
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 1108
1108 } // namespace 1109 } // namespace
1109 1110
1110 // static 1111 // static
1111 std::unique_ptr<ProxyResolverV8TracingFactory> 1112 std::unique_ptr<ProxyResolverV8TracingFactory>
1112 ProxyResolverV8TracingFactory::Create() { 1113 ProxyResolverV8TracingFactory::Create() {
1113 return base::WrapUnique(new ProxyResolverV8TracingFactoryImpl()); 1114 return base::WrapUnique(new ProxyResolverV8TracingFactoryImpl());
1114 } 1115 }
1115 1116
1116 } // namespace net 1117 } // namespace net
OLDNEW
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | net/quic/chromium/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698