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

Side by Side Diff: net/proxy/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, 7 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 unified diff | Download patch
« no previous file with comments | « net/proxy/proxy_script_decider_unittest.cc ('k') | net/proxy/proxy_script_fetcher_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // ProxyScriptFetcher is an async interface for fetching a proxy auto config 5 // ProxyScriptFetcher is an async interface for fetching a proxy auto config
6 // script. It is specific to fetching a PAC script; enforces timeout, max-size, 6 // script. It is specific to fetching a PAC script; enforces timeout, max-size,
7 // status code. 7 // status code.
8 8
9 #ifndef NET_PROXY_PROXY_SCRIPT_FETCHER_H_ 9 #ifndef NET_PROXY_PROXY_SCRIPT_FETCHER_H_
10 #define NET_PROXY_PROXY_SCRIPT_FETCHER_H_ 10 #define NET_PROXY_PROXY_SCRIPT_FETCHER_H_
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 virtual int Fetch(const GURL& url, 47 virtual int Fetch(const GURL& url,
48 base::string16* utf16_text, 48 base::string16* utf16_text,
49 const CompletionCallback& callback) = 0; 49 const CompletionCallback& callback) = 0;
50 50
51 // Aborts the in-progress fetch (if any). 51 // Aborts the in-progress fetch (if any).
52 virtual void Cancel() = 0; 52 virtual void Cancel() = 0;
53 53
54 // Returns the request context that this fetcher uses to issue downloads, 54 // Returns the request context that this fetcher uses to issue downloads,
55 // or NULL. 55 // or NULL.
56 virtual URLRequestContext* GetRequestContext() const = 0; 56 virtual URLRequestContext* GetRequestContext() const = 0;
57
58 // Fails the in-progress fetch (if any) and future requests will fail
59 // immediately. GetRequestContext() will always return nullptr after this is
60 // called. Must be called before the URLRequestContext the fetcher was
61 // created with is torn down.
62 virtual void OnShutdown() = 0;
57 }; 63 };
58 64
59 } // namespace net 65 } // namespace net
60 66
61 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_H_ 67 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_script_decider_unittest.cc ('k') | net/proxy/proxy_script_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698