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

Side by Side Diff: net/proxy/proxy_resolver_v8_tracing.h

Issue 939503004: Add LoadState reporting to the mojo proxy resolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@proxy-resolver-mojo
Patch Set: rebase Created 5 years, 9 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/proxy/proxy_resolver_mojo_unittest.cc ('k') | net/proxy/proxy_resolver_v8_tracing.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 #ifndef NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_ 5 #ifndef NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_
6 #define NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_ 6 #define NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 24 matching lines...) Expand all
35 // Constructs a ProxyResolver that will issue DNS requests through 35 // Constructs a ProxyResolver that will issue DNS requests through
36 // |host_resolver|, forward Javascript errors through |error_observer|, and 36 // |host_resolver|, forward Javascript errors through |error_observer|, and
37 // log Javascript errors and alerts to |net_log|. 37 // log Javascript errors and alerts to |net_log|.
38 // 38 //
39 // Note that the constructor takes ownership of |error_observer|, whereas 39 // Note that the constructor takes ownership of |error_observer|, whereas
40 // |host_resolver| and |net_log| are expected to outlive |this|. 40 // |host_resolver| and |net_log| are expected to outlive |this|.
41 ProxyResolverV8Tracing(HostResolver* host_resolver, 41 ProxyResolverV8Tracing(HostResolver* host_resolver,
42 ProxyResolverErrorObserver* error_observer, 42 ProxyResolverErrorObserver* error_observer,
43 NetLog* net_log); 43 NetLog* net_log);
44 44
45 // Constructs a ProxyResolver that will issue DNS requests through
46 // |host_resolver|, forward Javascript errors through |error_observer|, and
47 // log Javascript errors and alerts to |net_log|. When the LoadState for a
48 // request changes, |on_load_state_changed| will be invoked with the
49 // RequestHandle for that request with the new LoadState.
50 //
51 // Note that the constructor takes ownership of |error_observer|, whereas
52 // |host_resolver| and |net_log| are expected to outlive |this|.
53 ProxyResolverV8Tracing(HostResolver* host_resolver,
54 ProxyResolverErrorObserver* error_observer,
55 NetLog* net_log,
56 const LoadStateChangedCallback& on_load_state_changed);
57
45 ~ProxyResolverV8Tracing() override; 58 ~ProxyResolverV8Tracing() override;
46 59
47 // ProxyResolver implementation: 60 // ProxyResolver implementation:
48 int GetProxyForURL(const GURL& url, 61 int GetProxyForURL(const GURL& url,
49 ProxyInfo* results, 62 ProxyInfo* results,
50 const CompletionCallback& callback, 63 const CompletionCallback& callback,
51 RequestHandle* request, 64 RequestHandle* request,
52 const BoundNetLog& net_log) override; 65 const BoundNetLog& net_log) override;
53 void CancelRequest(RequestHandle request) override; 66 void CancelRequest(RequestHandle request) override;
54 LoadState GetLoadState(RequestHandle request) const override; 67 LoadState GetLoadState(RequestHandle request) const override;
(...skipping 13 matching lines...) Expand all
68 81
69 scoped_ptr<ProxyResolverErrorObserver> error_observer_; 82 scoped_ptr<ProxyResolverErrorObserver> error_observer_;
70 NetLog* net_log_; 83 NetLog* net_log_;
71 84
72 // The outstanding SetPacScript operation, or NULL. 85 // The outstanding SetPacScript operation, or NULL.
73 scoped_refptr<Job> set_pac_script_job_; 86 scoped_refptr<Job> set_pac_script_job_;
74 87
75 // The number of outstanding (non-cancelled) jobs. 88 // The number of outstanding (non-cancelled) jobs.
76 int num_outstanding_callbacks_; 89 int num_outstanding_callbacks_;
77 90
91 // Invoked when the load state for a request changes.
92 const LoadStateChangedCallback on_load_state_changed_;
93
78 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8Tracing); 94 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8Tracing);
79 }; 95 };
80 96
81 } // namespace net 97 } // namespace net
82 98
83 #endif // NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_ 99 #endif // NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_mojo_unittest.cc ('k') | net/proxy/proxy_resolver_v8_tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698