| OLD | NEW |
| 1 // Copyright (c) 2010 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/ref_counted.h" | 12 #include "base/ref_counted.h" |
| 13 #include "base/scoped_ptr.h" | 13 #include "base/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/network_change_notifier.h" | 16 #include "net/base/network_change_notifier.h" |
| 17 #include "net/base/net_log.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_server.h" | 19 #include "net/proxy/proxy_server.h" |
| 20 #include "net/proxy/proxy_info.h" | 20 #include "net/proxy/proxy_info.h" |
| 21 | 21 |
| 22 class GURL; | 22 class GURL; |
| 23 class MessageLoop; | 23 class MessageLoop; |
| 24 class URLRequestContext; | |
| 25 | 24 |
| 26 namespace net { | 25 namespace net { |
| 27 | 26 |
| 28 class HostResolver; | 27 class HostResolver; |
| 29 class InitProxyResolver; | 28 class InitProxyResolver; |
| 30 class ProxyResolver; | 29 class ProxyResolver; |
| 31 class ProxyScriptFetcher; | 30 class ProxyScriptFetcher; |
| 31 class URLRequestContext; |
| 32 | 32 |
| 33 // This class can be used to resolve the proxy server to use when loading a | 33 // This class can be used to resolve the proxy server to use when loading a |
| 34 // HTTP(S) URL. It uses the given ProxyResolver to handle the actual proxy | 34 // HTTP(S) URL. It uses the given ProxyResolver to handle the actual proxy |
| 35 // resolution. See ProxyResolverV8 for example. | 35 // resolution. See ProxyResolverV8 for example. |
| 36 class ProxyService : public base::RefCountedThreadSafe<ProxyService>, | 36 class ProxyService : public base::RefCountedThreadSafe<ProxyService>, |
| 37 public NetworkChangeNotifier::Observer, | 37 public NetworkChangeNotifier::Observer, |
| 38 public ProxyConfigService::Observer { | 38 public ProxyConfigService::Observer { |
| 39 public: | 39 public: |
| 40 // The instance takes ownership of |config_service| and |resolver|. | 40 // The instance takes ownership of |config_service| and |resolver|. |
| 41 // |net_log| is a possibly NULL destination to send log events to. It must | 41 // |net_log| is a possibly NULL destination to send log events to. It must |
| (...skipping 327 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 |