OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MOCK_PROXY_RESOLVER_H_ | 5 #ifndef NET_PROXY_MOCK_PROXY_RESOLVER_H_ |
6 #define NET_PROXY_MOCK_PROXY_RESOLVER_H_ | 6 #define NET_PROXY_MOCK_PROXY_RESOLVER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 }; | 46 }; |
47 | 47 |
48 class SetPacScriptRequest { | 48 class SetPacScriptRequest { |
49 public: | 49 public: |
50 SetPacScriptRequest( | 50 SetPacScriptRequest( |
51 MockAsyncProxyResolverBase* resolver, | 51 MockAsyncProxyResolverBase* resolver, |
52 const scoped_refptr<ProxyResolverScriptData>& script_data, | 52 const scoped_refptr<ProxyResolverScriptData>& script_data, |
53 const net::CompletionCallback& callback); | 53 const net::CompletionCallback& callback); |
54 ~SetPacScriptRequest(); | 54 ~SetPacScriptRequest(); |
55 | 55 |
56 const ProxyResolverScriptData* script_data() const { return script_data_; } | 56 const ProxyResolverScriptData* script_data() const { return script_data_. |
| 57 get(); } |
57 | 58 |
58 void CompleteNow(int rv); | 59 void CompleteNow(int rv); |
59 | 60 |
60 private: | 61 private: |
61 MockAsyncProxyResolverBase* resolver_; | 62 MockAsyncProxyResolverBase* resolver_; |
62 const scoped_refptr<ProxyResolverScriptData> script_data_; | 63 const scoped_refptr<ProxyResolverScriptData> script_data_; |
63 net::CompletionCallback callback_; | 64 net::CompletionCallback callback_; |
64 MessageLoop* origin_loop_; | 65 MessageLoop* origin_loop_; |
65 }; | 66 }; |
66 | 67 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 119 |
119 class MockAsyncProxyResolverExpectsBytes : public MockAsyncProxyResolverBase { | 120 class MockAsyncProxyResolverExpectsBytes : public MockAsyncProxyResolverBase { |
120 public: | 121 public: |
121 MockAsyncProxyResolverExpectsBytes() | 122 MockAsyncProxyResolverExpectsBytes() |
122 : MockAsyncProxyResolverBase(true /*expects_pac_bytes*/) {} | 123 : MockAsyncProxyResolverBase(true /*expects_pac_bytes*/) {} |
123 }; | 124 }; |
124 | 125 |
125 } // namespace net | 126 } // namespace net |
126 | 127 |
127 #endif // NET_PROXY_MOCK_PROXY_RESOLVER_H_ | 128 #endif // NET_PROXY_MOCK_PROXY_RESOLVER_H_ |
OLD | NEW |