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

Side by Side Diff: net/proxy/proxy_script_decider.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/mock_proxy_script_fetcher.cc ('k') | net/proxy/proxy_script_decider.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef NET_PROXY_PROXY_SCRIPT_DECIDER_H_ 5 #ifndef NET_PROXY_PROXY_SCRIPT_DECIDER_H_
6 #define NET_PROXY_PROXY_SCRIPT_DECIDER_H_ 6 #define NET_PROXY_PROXY_SCRIPT_DECIDER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // deciding on will be available vial the effective_settings() accessor. 74 // deciding on will be available vial the effective_settings() accessor.
75 // Note that this may differ from |config| since we will have stripped any 75 // Note that this may differ from |config| since we will have stripped any
76 // manual settings, and decided whether to use auto-detect or the custom PAC 76 // manual settings, and decided whether to use auto-detect or the custom PAC
77 // URL. Finally, if auto-detect was used we may now have resolved that to a 77 // URL. Finally, if auto-detect was used we may now have resolved that to a
78 // specific script URL. 78 // specific script URL.
79 int Start(const ProxyConfig& config, 79 int Start(const ProxyConfig& config,
80 const base::TimeDelta wait_delay, 80 const base::TimeDelta wait_delay,
81 bool fetch_pac_bytes, 81 bool fetch_pac_bytes,
82 const CompletionCallback& callback); 82 const CompletionCallback& callback);
83 83
84 // Shuts down any in-progress DNS requests, and cancels any ScriptFetcher
85 // requests. Does not call OnShutdown on the [Dhcp]ProxyScriptFetcher.
86 void OnShutdown();
87
84 const ProxyConfig& effective_config() const; 88 const ProxyConfig& effective_config() const;
85 89
86 const scoped_refptr<ProxyResolverScriptData>& script_data() const; 90 const scoped_refptr<ProxyResolverScriptData>& script_data() const;
87 91
88 void set_quick_check_enabled(bool enabled) { 92 void set_quick_check_enabled(bool enabled) {
89 quick_check_enabled_ = enabled; 93 quick_check_enabled_ = enabled;
90 } 94 }
91 95
92 bool quick_check_enabled() const { return quick_check_enabled_; } 96 bool quick_check_enabled() const { return quick_check_enabled_; }
93 97
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 200
197 // Whether to do DNS quick check 201 // Whether to do DNS quick check
198 bool quick_check_enabled_; 202 bool quick_check_enabled_;
199 203
200 // Results. 204 // Results.
201 ProxyConfig effective_config_; 205 ProxyConfig effective_config_;
202 scoped_refptr<ProxyResolverScriptData> script_data_; 206 scoped_refptr<ProxyResolverScriptData> script_data_;
203 207
204 AddressList wpad_addresses_; 208 AddressList wpad_addresses_;
205 base::OneShotTimer quick_check_timer_; 209 base::OneShotTimer quick_check_timer_;
206 HostResolver* host_resolver_;
207 std::unique_ptr<HostResolver::Request> request_; 210 std::unique_ptr<HostResolver::Request> request_;
208 base::Time quick_check_start_time_; 211 base::Time quick_check_start_time_;
209 212
210 DISALLOW_COPY_AND_ASSIGN(ProxyScriptDecider); 213 DISALLOW_COPY_AND_ASSIGN(ProxyScriptDecider);
211 }; 214 };
212 215
213 } // namespace net 216 } // namespace net
214 217
215 #endif // NET_PROXY_PROXY_SCRIPT_DECIDER_H_ 218 #endif // NET_PROXY_PROXY_SCRIPT_DECIDER_H_
OLDNEW
« no previous file with comments | « net/proxy/mock_proxy_script_fetcher.cc ('k') | net/proxy/proxy_script_decider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698