diff options
Diffstat (limited to 'net/proxy/proxy_service.cc')
-rw-r--r-- | net/proxy/proxy_service.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc index 41ba41d..892d0f7 100644 --- a/net/proxy/proxy_service.cc +++ b/net/proxy/proxy_service.cc @@ -118,6 +118,17 @@ class ProxyResolverNull : public ProxyResolver { NOTREACHED(); } + virtual LoadState GetLoadState(RequestHandle request) const OVERRIDE { + NOTREACHED(); + return LOAD_STATE_IDLE; + } + + virtual LoadState GetLoadStateThreadSafe( + RequestHandle request) const OVERRIDE { + NOTREACHED(); + return LOAD_STATE_IDLE; + } + virtual void CancelSetPacScript() OVERRIDE { NOTREACHED(); } @@ -150,6 +161,17 @@ class ProxyResolverFromPacString : public ProxyResolver { NOTREACHED(); } + virtual LoadState GetLoadState(RequestHandle request) const OVERRIDE { + NOTREACHED(); + return LOAD_STATE_IDLE; + } + + virtual LoadState GetLoadStateThreadSafe( + RequestHandle request) const OVERRIDE { + NOTREACHED(); + return LOAD_STATE_IDLE; + } + virtual void CancelSetPacScript() OVERRIDE { NOTREACHED(); } @@ -382,6 +404,12 @@ class ProxyService::PacRequest BoundNetLog* net_log() { return &net_log_; } + LoadState GetLoadState() const { + if (is_started()) + return resolver()->GetLoadState(resolve_job_); + return LOAD_STATE_RESOLVING_PROXY_FOR_URL; + } + private: friend class base::RefCounted<ProxyService::PacRequest>; @@ -779,6 +807,11 @@ void ProxyService::CancelPacRequest(PacRequest* req) { RemovePendingRequest(req); } +LoadState ProxyService::GetLoadState(const PacRequest* req) const { + CHECK(req); + return req->GetLoadState(); +} + bool ProxyService::ContainsPendingRequest(PacRequest* req) { PendingRequests::iterator it = std::find( pending_requests_.begin(), pending_requests_.end(), req); |