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

Unified Diff: net/proxy/mojo_proxy_resolver_impl.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: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: net/proxy/mojo_proxy_resolver_impl.h
diff --git a/net/proxy/mojo_proxy_resolver_impl.h b/net/proxy/mojo_proxy_resolver_impl.h
index ac3c5f8de456a0741c96e8b6b4e2a7b0cf47f944..f9182f512b0f7f65eb39233879e629dee88a430a 100644
--- a/net/proxy/mojo_proxy_resolver_impl.h
+++ b/net/proxy/mojo_proxy_resolver_impl.h
@@ -5,22 +5,26 @@
#ifndef NET_PROXY_MOJO_PROXY_RESOLVER_IMPL_H_
#define NET_PROXY_MOJO_PROXY_RESOLVER_IMPL_H_
+#include <map>
#include <queue>
#include <set>
#include "base/memory/scoped_ptr.h"
#include "net/interfaces/proxy_resolver_service.mojom.h"
+#include "net/proxy/proxy_resolver.h"
namespace net {
-class ProxyResolver;
-
class MojoProxyResolverImpl : public interfaces::ProxyResolver {
public:
explicit MojoProxyResolverImpl(scoped_ptr<net::ProxyResolver> resolver);
~MojoProxyResolverImpl() override;
+ // Invoked when the LoadState of a request changes.
+ void LoadStateChanged(net::ProxyResolver::RequestHandle handle,
+ LoadState load_state);
+
private:
class Job;
struct SetPacScriptRequest;
@@ -32,13 +36,14 @@ class MojoProxyResolverImpl : public interfaces::ProxyResolver {
const mojo::String& url,
interfaces::ProxyResolverRequestClientPtr client) override;
- void DeleteJob(Job* job);
+ void DeleteJob(Job* job, net::ProxyResolver::RequestHandle handle);
void StartSetPacScript();
void SetPacScriptDone(int result);
scoped_ptr<net::ProxyResolver> resolver_;
std::set<Job*> resolve_jobs_;
+ std::map<net::ProxyResolver::RequestHandle, Job*> request_handle_to_job_;
std::queue<SetPacScriptRequest> set_pac_script_requests_;

Powered by Google App Engine
This is Rietveld 408576698