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

Unified Diff: net/proxy/proxy_script_fetcher.h

Issue 6831025: Adds support for the DHCP portion of the WPAD (proxy auto-discovery) protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add timeout on Win32 DHCP API. Created 9 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
Index: net/proxy/proxy_script_fetcher.h
diff --git a/net/proxy/proxy_script_fetcher.h b/net/proxy/proxy_script_fetcher.h
index c8cda247e72f107cda042e8be6d1387806b09a57..ae925082c267d1df5dbcb76f61d5958926d0892d 100644
--- a/net/proxy/proxy_script_fetcher.h
+++ b/net/proxy/proxy_script_fetcher.h
@@ -26,7 +26,7 @@ class ProxyScriptFetcher {
// Destruction should cancel any outstanding requests.
virtual ~ProxyScriptFetcher() {}
- // Downloads the given PAC URL, and invokes |callback| on completion.
+ // Downloads a PAC script, and invokes |callback| on completion.
// Returns OK on success, otherwise the error code. If the return code is
// ERR_IO_PENDING, then the request completes asynchronously, and |callback|
// will be invoked later with the final error code.
@@ -44,7 +44,7 @@ class ProxyScriptFetcher {
// deleting |this|), then no callback is invoked.
//
// Only one fetch is allowed to be outstanding at a time.
- virtual int Fetch(const GURL& url, string16* utf16_text,
+ virtual int Fetch(string16* utf16_text,
CompletionCallback* callback) = 0;
// Aborts the in-progress fetch (if any).
@@ -52,7 +52,14 @@ class ProxyScriptFetcher {
// Returns the request context that this fetcher uses to issue downloads,
// or NULL.
- virtual URLRequestContext* GetRequestContext() = 0;
+ virtual URLRequestContext* GetRequestContext() const = 0;
+};
+
+// A proxy script fetcher that fetches a specific URL.
+class URLProxyScriptFetcher : public ProxyScriptFetcher {
+public:
+ // Sets the URL to retrieve when Fetch() is called.
+ virtual void SetURL(const GURL& url) = 0;
};
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698