| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_RESOLVER_V8_H_ | 5 #ifndef NET_PROXY_PROXY_RESOLVER_V8_H_ |
| 6 #define NET_PROXY_PROXY_RESOLVER_V8_H_ | 6 #define NET_PROXY_PROXY_RESOLVER_V8_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "net/proxy/proxy_resolver.h" | 10 #include "net/proxy/proxy_resolver.h" |
| 11 | 11 |
| 12 class MessageLoop; | |
| 13 | |
| 14 namespace net { | 12 namespace net { |
| 15 | 13 |
| 16 class HostResolver; | |
| 17 class ProxyResolverJSBindings; | 14 class ProxyResolverJSBindings; |
| 18 | 15 |
| 19 // Implementation of ProxyResolver that uses V8 to evaluate PAC scripts. | 16 // Implementation of ProxyResolver that uses V8 to evaluate PAC scripts. |
| 20 // | 17 // |
| 21 // ---------------------------------------------------------------------------- | 18 // ---------------------------------------------------------------------------- |
| 22 // !!! Important note on threading model: | 19 // !!! Important note on threading model: |
| 23 // ---------------------------------------------------------------------------- | 20 // ---------------------------------------------------------------------------- |
| 24 // There can be only one instance of V8 running at a time. To enforce this | 21 // There can be only one instance of V8 running at a time. To enforce this |
| 25 // constraint, ProxyResolverV8 holds a v8::Locker during execution. Therefore | 22 // constraint, ProxyResolverV8 holds a v8::Locker during execution. Therefore |
| 26 // it is OK to run multiple instances of ProxyResolverV8 on different threads, | 23 // it is OK to run multiple instances of ProxyResolverV8 on different threads, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 scoped_ptr<Context> context_; | 63 scoped_ptr<Context> context_; |
| 67 | 64 |
| 68 scoped_ptr<ProxyResolverJSBindings> js_bindings_; | 65 scoped_ptr<ProxyResolverJSBindings> js_bindings_; |
| 69 | 66 |
| 70 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8); | 67 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8); |
| 71 }; | 68 }; |
| 72 | 69 |
| 73 } // namespace net | 70 } // namespace net |
| 74 | 71 |
| 75 #endif // NET_PROXY_PROXY_RESOLVER_V8_H_ | 72 #endif // NET_PROXY_PROXY_RESOLVER_V8_H_ |
| OLD | NEW |