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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 }; | 48 }; |
49 | 49 |
50 class SetPacScriptRequest { | 50 class SetPacScriptRequest { |
51 public: | 51 public: |
52 SetPacScriptRequest( | 52 SetPacScriptRequest( |
53 MockAsyncProxyResolverBase* resolver, | 53 MockAsyncProxyResolverBase* resolver, |
54 const scoped_refptr<ProxyResolverScriptData>& script_data, | 54 const scoped_refptr<ProxyResolverScriptData>& script_data, |
55 const net::CompletionCallback& callback); | 55 const net::CompletionCallback& callback); |
56 ~SetPacScriptRequest(); | 56 ~SetPacScriptRequest(); |
57 | 57 |
58 const ProxyResolverScriptData* script_data() const { return script_data_; } | 58 const ProxyResolverScriptData* script_data() const { |
| 59 return script_data_.get(); |
| 60 } |
59 | 61 |
60 void CompleteNow(int rv); | 62 void CompleteNow(int rv); |
61 | 63 |
62 private: | 64 private: |
63 MockAsyncProxyResolverBase* resolver_; | 65 MockAsyncProxyResolverBase* resolver_; |
64 const scoped_refptr<ProxyResolverScriptData> script_data_; | 66 const scoped_refptr<ProxyResolverScriptData> script_data_; |
65 net::CompletionCallback callback_; | 67 net::CompletionCallback callback_; |
66 base::MessageLoop* origin_loop_; | 68 base::MessageLoop* origin_loop_; |
67 }; | 69 }; |
68 | 70 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 120 |
119 class MockAsyncProxyResolverExpectsBytes : public MockAsyncProxyResolverBase { | 121 class MockAsyncProxyResolverExpectsBytes : public MockAsyncProxyResolverBase { |
120 public: | 122 public: |
121 MockAsyncProxyResolverExpectsBytes() | 123 MockAsyncProxyResolverExpectsBytes() |
122 : MockAsyncProxyResolverBase(true /*expects_pac_bytes*/) {} | 124 : MockAsyncProxyResolverBase(true /*expects_pac_bytes*/) {} |
123 }; | 125 }; |
124 | 126 |
125 } // namespace net | 127 } // namespace net |
126 | 128 |
127 #endif // NET_PROXY_MOCK_PROXY_RESOLVER_H_ | 129 #endif // NET_PROXY_MOCK_PROXY_RESOLVER_H_ |
OLD | NEW |