| 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 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // Removes |req| from the list of pending requests. | 270 // Removes |req| from the list of pending requests. |
| 271 void RemovePendingRequest(PacRequest* req); | 271 void RemovePendingRequest(PacRequest* req); |
| 272 | 272 |
| 273 // Called when proxy resolution has completed (either synchronously or | 273 // Called when proxy resolution has completed (either synchronously or |
| 274 // asynchronously). Handles logging the result, and cleaning out | 274 // asynchronously). Handles logging the result, and cleaning out |
| 275 // bad entries from the results list. | 275 // bad entries from the results list. |
| 276 int DidFinishResolvingProxy(ProxyInfo* result, | 276 int DidFinishResolvingProxy(ProxyInfo* result, |
| 277 int result_code, | 277 int result_code, |
| 278 const BoundNetLog& net_log); | 278 const BoundNetLog& net_log); |
| 279 | 279 |
| 280 // Start initialization using |fetched_config_|. |
| 281 void InitializeUsingLastFetchedConfig(); |
| 282 |
| 280 // NetworkChangeNotifier::Observer | 283 // NetworkChangeNotifier::Observer |
| 281 // 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. |
| 282 virtual void OnIPAddressChanged(); | 285 virtual void OnIPAddressChanged(); |
| 283 | 286 |
| 284 // ProxyConfigService::Observer | 287 // ProxyConfigService::Observer |
| 285 virtual void OnProxyConfigChanged(const ProxyConfig& config); | 288 virtual void OnProxyConfigChanged(const ProxyConfig& config); |
| 286 | 289 |
| 287 // Start initialization using |fetched_config_|. | |
| 288 void InitializeUsingLastFetchedConfig(); | |
| 289 | |
| 290 scoped_ptr<ProxyConfigService> config_service_; | 290 scoped_ptr<ProxyConfigService> config_service_; |
| 291 scoped_ptr<ProxyResolver> resolver_; | 291 scoped_ptr<ProxyResolver> resolver_; |
| 292 | 292 |
| 293 // We store the proxy configuration that was last fetched from the | 293 // We store the proxy configuration that was last fetched from the |
| 294 // ProxyConfigService, as well as the resulting "effective" configuration. | 294 // ProxyConfigService, as well as the resulting "effective" configuration. |
| 295 // The effective configuration is what we condense the original fetched | 295 // The effective configuration is what we condense the original fetched |
| 296 // settings to after testing the various automatic settings (auto-detect | 296 // settings to after testing the various automatic settings (auto-detect |
| 297 // and custom PAC url). | 297 // and custom PAC url). |
| 298 ProxyConfig fetched_config_; | 298 ProxyConfig fetched_config_; |
| 299 ProxyConfig config_; | 299 ProxyConfig config_; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 369 |
| 370 base::WaitableEvent event_; | 370 base::WaitableEvent event_; |
| 371 CompletionCallbackImpl<SyncProxyServiceHelper> callback_; | 371 CompletionCallbackImpl<SyncProxyServiceHelper> callback_; |
| 372 ProxyInfo proxy_info_; | 372 ProxyInfo proxy_info_; |
| 373 int result_; | 373 int result_; |
| 374 }; | 374 }; |
| 375 | 375 |
| 376 } // namespace net | 376 } // namespace net |
| 377 | 377 |
| 378 #endif // NET_PROXY_PROXY_SERVICE_H_ | 378 #endif // NET_PROXY_PROXY_SERVICE_H_ |
| OLD | NEW |