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

Unified Diff: net/proxy/single_threaded_proxy_resolver.h

Issue 160510: Better match IE's proxy settings.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix merge conflict Created 11 years, 4 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 | « net/proxy/proxy_service_unittest.cc ('k') | net/proxy/single_threaded_proxy_resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/single_threaded_proxy_resolver.h
===================================================================
--- net/proxy/single_threaded_proxy_resolver.h (revision 22399)
+++ net/proxy/single_threaded_proxy_resolver.h (working copy)
@@ -37,6 +37,7 @@
CompletionCallback* callback,
RequestHandle* request);
virtual void CancelRequest(RequestHandle request);
+ virtual void CancelSetPacScript();
protected:
// The wrapped (synchronous) ProxyResolver.
@@ -47,19 +48,18 @@
// thread.
class Job;
friend class Job;
+ class SetPacScriptTask;
+ friend class SetPacScriptTask;
// FIFO queue that contains the in-progress job, and any pending jobs.
typedef std::deque<scoped_refptr<Job> > PendingJobsQueue;
base::Thread* thread() { return thread_.get(); }
// ProxyResolver implementation:
- virtual void SetPacScriptByUrlInternal(const GURL& pac_url);
- virtual void SetPacScriptByDataInternal(const std::string& bytes);
+ virtual int SetPacScript(const GURL& pac_url,
+ const std::string& pac_bytes,
+ CompletionCallback* callback);
- // Helper for shared code between SetPacScriptByUrlInternal() and
- // SetPacScriptByDataInternal() -- the unused parameter is set to empty.
- void SetPacScriptHelper(const GURL& pac_url, const std::string& bytes);
-
// Starts the worker thread if it isn't already running.
void EnsureThreadStarted();
@@ -71,6 +71,10 @@
// DCHECK for verification purposes.
void RemoveFrontOfJobsQueueAndStartNext(Job* expected_job);
+ // Clears |outstanding_set_pac_script_task_|.
+ // Called when |task| has just finished.
+ void RemoveOutstandingSetPacScriptTask(SetPacScriptTask* task);
+
// The synchronous resolver implementation.
scoped_ptr<ProxyResolver> resolver_;
@@ -81,6 +85,7 @@
scoped_ptr<base::Thread> thread_;
PendingJobsQueue pending_jobs_;
+ scoped_refptr<SetPacScriptTask> outstanding_set_pac_script_task_;
};
} // namespace net
« no previous file with comments | « net/proxy/proxy_service_unittest.cc ('k') | net/proxy/single_threaded_proxy_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698