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_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 scoped_refptr<net::IOBuffer> buf_; | 181 scoped_refptr<net::IOBuffer> buf_; |
182 }; | 182 }; |
183 | 183 |
184 //----------------------------------------------------------------------------- | 184 //----------------------------------------------------------------------------- |
185 | 185 |
186 class TestNetworkDelegate : public net::NetworkDelegate { | 186 class TestNetworkDelegate : public net::NetworkDelegate { |
187 public: | 187 public: |
188 enum Options { | 188 enum Options { |
189 NO_GET_COOKIES = 1 << 0, | 189 NO_GET_COOKIES = 1 << 0, |
190 NO_SET_COOKIE = 1 << 1, | 190 NO_SET_COOKIE = 1 << 1, |
191 FORCE_SESSION = 1 << 2, | |
192 }; | 191 }; |
193 | 192 |
194 TestNetworkDelegate(); | 193 TestNetworkDelegate(); |
195 virtual ~TestNetworkDelegate(); | 194 virtual ~TestNetworkDelegate(); |
196 | 195 |
197 void set_cookie_options(int o) {cookie_options_bit_mask_ = o; } | 196 void set_cookie_options(int o) {cookie_options_bit_mask_ = o; } |
198 | 197 |
199 int last_error() const { return last_error_; } | 198 int last_error() const { return last_error_; } |
200 int error_count() const { return error_count_; } | 199 int error_count() const { return error_count_; } |
201 int created_requests() const { return created_requests_; } | 200 int created_requests() const { return created_requests_; } |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 | 289 |
291 private: | 290 private: |
292 static std::string value_; | 291 static std::string value_; |
293 const std::string old_value_; | 292 const std::string old_value_; |
294 const std::string new_value_; | 293 const std::string new_value_; |
295 | 294 |
296 DISALLOW_COPY_AND_ASSIGN(ScopedCustomUrlRequestTestHttpHost); | 295 DISALLOW_COPY_AND_ASSIGN(ScopedCustomUrlRequestTestHttpHost); |
297 }; | 296 }; |
298 | 297 |
299 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ | 298 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ |
OLD | NEW |