OLD | NEW |
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 #ifndef NET_PROXY_PROXY_SERVICE_H_ | 5 #ifndef NET_PROXY_PROXY_SERVICE_H_ |
6 #define NET_PROXY_PROXY_SERVICE_H_ | 6 #define NET_PROXY_PROXY_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
15 #include "net/base/completion_callback.h" | 15 #include "net/base/completion_callback.h" |
| 16 #include "net/base/net_log.h" |
16 #include "net/base/network_change_notifier.h" | 17 #include "net/base/network_change_notifier.h" |
17 #include "net/base/net_log.h" | |
18 #include "net/proxy/proxy_config_service.h" | 18 #include "net/proxy/proxy_config_service.h" |
| 19 #include "net/proxy/proxy_info.h" |
19 #include "net/proxy/proxy_server.h" | 20 #include "net/proxy/proxy_server.h" |
20 #include "net/proxy/proxy_info.h" | |
21 | 21 |
22 class GURL; | 22 class GURL; |
23 class MessageLoop; | 23 class MessageLoop; |
24 | 24 |
25 namespace net { | 25 namespace net { |
26 | 26 |
27 class HostResolver; | 27 class HostResolver; |
28 class InitProxyResolver; | 28 class InitProxyResolver; |
29 class ProxyResolver; | 29 class ProxyResolver; |
30 class ProxyScriptFetcher; | 30 class ProxyScriptFetcher; |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 const BoundNetLog& net_log); | 278 const BoundNetLog& net_log); |
279 | 279 |
280 // Start initialization using |fetched_config_|. | 280 // Start initialization using |fetched_config_|. |
281 void InitializeUsingLastFetchedConfig(); | 281 void InitializeUsingLastFetchedConfig(); |
282 | 282 |
283 // NetworkChangeNotifier::IPAddressObserver | 283 // NetworkChangeNotifier::IPAddressObserver |
284 // When this is called, we re-fetch PAC scripts and re-run WPAD. | 284 // When this is called, we re-fetch PAC scripts and re-run WPAD. |
285 virtual void OnIPAddressChanged(); | 285 virtual void OnIPAddressChanged(); |
286 | 286 |
287 // ProxyConfigService::Observer | 287 // ProxyConfigService::Observer |
288 virtual void OnProxyConfigChanged(const ProxyConfig& config); | 288 virtual void OnProxyConfigChanged( |
| 289 const ProxyConfig& config, |
| 290 ProxyConfigService::ConfigAvailability availability); |
289 | 291 |
290 scoped_ptr<ProxyConfigService> config_service_; | 292 scoped_ptr<ProxyConfigService> config_service_; |
291 scoped_ptr<ProxyResolver> resolver_; | 293 scoped_ptr<ProxyResolver> resolver_; |
292 | 294 |
293 // We store the proxy configuration that was last fetched from the | 295 // We store the proxy configuration that was last fetched from the |
294 // ProxyConfigService, as well as the resulting "effective" configuration. | 296 // ProxyConfigService, as well as the resulting "effective" configuration. |
295 // The effective configuration is what we condense the original fetched | 297 // The effective configuration is what we condense the original fetched |
296 // settings to after testing the various automatic settings (auto-detect | 298 // settings to after testing the various automatic settings (auto-detect |
297 // and custom PAC url). | 299 // and custom PAC url). |
298 ProxyConfig fetched_config_; | 300 ProxyConfig fetched_config_; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 | 371 |
370 base::WaitableEvent event_; | 372 base::WaitableEvent event_; |
371 CompletionCallbackImpl<SyncProxyServiceHelper> callback_; | 373 CompletionCallbackImpl<SyncProxyServiceHelper> callback_; |
372 ProxyInfo proxy_info_; | 374 ProxyInfo proxy_info_; |
373 int result_; | 375 int result_; |
374 }; | 376 }; |
375 | 377 |
376 } // namespace net | 378 } // namespace net |
377 | 379 |
378 #endif // NET_PROXY_PROXY_SERVICE_H_ | 380 #endif // NET_PROXY_PROXY_SERVICE_H_ |
OLD | NEW |