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

Unified Diff: net/proxy/dhcp_proxy_script_fetcher.h

Issue 2845643003: Allow ProxyService to share URLRequestContext with everything else. (Closed)
Patch Set: Fix fetcher shutdown with no active request, add test, add comment Created 3 years, 8 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
« no previous file with comments | « chromeos/network/dhcp_proxy_script_fetcher_chromeos.cc ('k') | net/proxy/dhcp_proxy_script_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/dhcp_proxy_script_fetcher.h
diff --git a/net/proxy/dhcp_proxy_script_fetcher.h b/net/proxy/dhcp_proxy_script_fetcher.h
index a85234dcc6141de65bf56c91ae41fb23f1461637..0d4a89cc5a784c7062e33f7b6403c8a425de168d 100644
--- a/net/proxy/dhcp_proxy_script_fetcher.h
+++ b/net/proxy/dhcp_proxy_script_fetcher.h
@@ -62,6 +62,11 @@ class NET_EXPORT_PRIVATE DhcpProxyScriptFetcher {
// Aborts the in-progress fetch (if any).
virtual void Cancel() = 0;
+ // Fails the in-progress fetch (if any) and future requests will fail
+ // immediately. Must be called before the URLRequestContext the fetcher was
+ // created with is torn down.
+ virtual void OnShutdown() = 0;
+
// After successful completion of |Fetch()|, this will return the URL
// retrieved from DHCP. It is reset if/when |Fetch()| is called again.
virtual const GURL& GetPacURL() const = 0;
@@ -88,6 +93,7 @@ class NET_EXPORT_PRIVATE DoNothingDhcpProxyScriptFetcher
int Fetch(base::string16* utf16_text,
const CompletionCallback& callback) override;
void Cancel() override;
+ void OnShutdown() override;
const GURL& GetPacURL() const override;
private:
« no previous file with comments | « chromeos/network/dhcp_proxy_script_fetcher_chromeos.cc ('k') | net/proxy/dhcp_proxy_script_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698