| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // ResolveProxy. | 92 // ResolveProxy. |
| 93 // | 93 // |
| 94 // NULL can be passed for |pac_request| if the caller will not need to | 94 // NULL can be passed for |pac_request| if the caller will not need to |
| 95 // cancel the request. | 95 // cancel the request. |
| 96 // | 96 // |
| 97 // Returns ERR_FAILED if there is not another proxy config to try. | 97 // Returns ERR_FAILED if there is not another proxy config to try. |
| 98 // | 98 // |
| 99 // Profiling information for the request is saved to |net_log| if non-NULL. | 99 // Profiling information for the request is saved to |net_log| if non-NULL. |
| 100 int ReconsiderProxyAfterError(const GURL& url, | 100 int ReconsiderProxyAfterError(const GURL& url, |
| 101 ProxyInfo* results, | 101 ProxyInfo* results, |
| 102 OldCompletionCallback* callback, | 102 const CompletionCallback& callback, |
| 103 PacRequest** pac_request, | 103 PacRequest** pac_request, |
| 104 const BoundNetLog& net_log); | 104 const BoundNetLog& net_log); |
| 105 | 105 |
| 106 // Called to report that the last proxy connection succeeded. If |proxy_info| | 106 // Called to report that the last proxy connection succeeded. If |proxy_info| |
| 107 // has a non empty proxy_retry_info map, the proxies that have been tried (and | 107 // has a non empty proxy_retry_info map, the proxies that have been tried (and |
| 108 // failed) for this request will be marked as bad. | 108 // failed) for this request will be marked as bad. |
| 109 void ReportSuccess(const ProxyInfo& proxy_info); | 109 void ReportSuccess(const ProxyInfo& proxy_info); |
| 110 | 110 |
| 111 // Call this method with a non-null |pac_request| to cancel the PAC request. | 111 // Call this method with a non-null |pac_request| to cancel the PAC request. |
| 112 void CancelPacRequest(PacRequest* pac_request); | 112 void CancelPacRequest(PacRequest* pac_request); |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 | 397 |
| 398 void StartAsyncResolve(const GURL& url, const BoundNetLog& net_log); | 398 void StartAsyncResolve(const GURL& url, const BoundNetLog& net_log); |
| 399 void StartAsyncReconsider(const GURL& url, const BoundNetLog& net_log); | 399 void StartAsyncReconsider(const GURL& url, const BoundNetLog& net_log); |
| 400 | 400 |
| 401 void OnCompletion(int result); | 401 void OnCompletion(int result); |
| 402 | 402 |
| 403 MessageLoop* io_message_loop_; | 403 MessageLoop* io_message_loop_; |
| 404 ProxyService* proxy_service_; | 404 ProxyService* proxy_service_; |
| 405 | 405 |
| 406 base::WaitableEvent event_; | 406 base::WaitableEvent event_; |
| 407 OldCompletionCallbackImpl<SyncProxyServiceHelper> callback_; | 407 CompletionCallback callback_; |
| 408 ProxyInfo proxy_info_; | 408 ProxyInfo proxy_info_; |
| 409 int result_; | 409 int result_; |
| 410 }; | 410 }; |
| 411 | 411 |
| 412 } // namespace net | 412 } // namespace net |
| 413 | 413 |
| 414 #endif // NET_PROXY_PROXY_SERVICE_H_ | 414 #endif // NET_PROXY_PROXY_SERVICE_H_ |
| OLD | NEW |