| 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_NETWORK_DELEGATE_ERROR_OBSERVER_H_ | 5 #ifndef NET_PROXY_NETWORK_DELEGATE_ERROR_OBSERVER_H_ |
| 6 #define NET_PROXY_NETWORK_DELEGATE_ERROR_OBSERVER_H_ | 6 #define NET_PROXY_NETWORK_DELEGATE_ERROR_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "net/proxy/proxy_resolver_error_observer.h" | 11 #include "net/proxy/proxy_resolver_error_observer.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class MessageLoopProxy; | 14 class MessageLoopProxy; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 | 18 |
| 19 class NetworkDelegate; | 19 class NetworkDelegate; |
| 20 | 20 |
| 21 // An implementation of ProxyResolverErrorObserver that forwards PAC script | 21 // An implementation of ProxyResolverErrorObserver that forwards PAC script |
| 22 // errors to a NetworkDelegate object on the thread it lives on. | 22 // errors to a NetworkDelegate object on the thread it lives on. |
| 23 class NET_TEST NetworkDelegateErrorObserver | 23 class NET_EXPORT_PRIVATE NetworkDelegateErrorObserver |
| 24 : public ProxyResolverErrorObserver { | 24 : public ProxyResolverErrorObserver { |
| 25 public: | 25 public: |
| 26 NetworkDelegateErrorObserver(NetworkDelegate* network_delegate, | 26 NetworkDelegateErrorObserver(NetworkDelegate* network_delegate, |
| 27 base::MessageLoopProxy* origin_loop); | 27 base::MessageLoopProxy* origin_loop); |
| 28 virtual ~NetworkDelegateErrorObserver(); | 28 virtual ~NetworkDelegateErrorObserver(); |
| 29 | 29 |
| 30 // ProxyResolverErrorObserver implementation. | 30 // ProxyResolverErrorObserver implementation. |
| 31 virtual void OnPACScriptError(int line_number, const string16& error) | 31 virtual void OnPACScriptError(int line_number, const string16& error) |
| 32 OVERRIDE; | 32 OVERRIDE; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 class Core; | 35 class Core; |
| 36 | 36 |
| 37 scoped_refptr<Core> core_; | 37 scoped_refptr<Core> core_; |
| 38 | 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(NetworkDelegateErrorObserver); | 39 DISALLOW_COPY_AND_ASSIGN(NetworkDelegateErrorObserver); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace net | 42 } // namespace net |
| 43 | 43 |
| 44 #endif // NET_PROXY_NETWORK_DELEGATE_ERROR_OBSERVER_H_ | 44 #endif // NET_PROXY_NETWORK_DELEGATE_ERROR_OBSERVER_H_ |
| OLD | NEW |