| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "components/component_updater/test/url_request_post_interceptor.h" | 5 #include "components/component_updater/test/url_request_post_interceptor.h" |
| 6 | 6 |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 ++interceptor->hit_count_; | 219 ++interceptor->hit_count_; |
| 220 | 220 |
| 221 return new URLRequestMockJob( | 221 return new URLRequestMockJob( |
| 222 request, network_delegate, response_code, response_body); | 222 request, network_delegate, response_code, response_body); |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 | 225 |
| 226 return NULL; | 226 return NULL; |
| 227 } | 227 } |
| 228 | 228 |
| 229 net::URLRequestJob* MaybeInterceptResponse( |
| 230 net::URLRequest* request, |
| 231 net::NetworkDelegate* network_delegate) const override { |
| 232 return NULL; |
| 233 } |
| 234 |
| 235 net::URLRequestJob* MaybeInterceptRedirect( |
| 236 net::URLRequest* request, |
| 237 net::NetworkDelegate* network_delegate, |
| 238 const GURL& location) const override { |
| 239 return NULL; |
| 240 } |
| 241 |
| 229 typedef std::map<GURL, URLRequestPostInterceptor*> InterceptorMap; | 242 typedef std::map<GURL, URLRequestPostInterceptor*> InterceptorMap; |
| 230 InterceptorMap interceptors_; | 243 InterceptorMap interceptors_; |
| 231 | 244 |
| 232 const std::string scheme_; | 245 const std::string scheme_; |
| 233 const std::string hostname_; | 246 const std::string hostname_; |
| 234 scoped_refptr<base::SequencedTaskRunner> io_task_runner_; | 247 scoped_refptr<base::SequencedTaskRunner> io_task_runner_; |
| 235 | 248 |
| 236 DISALLOW_COPY_AND_ASSIGN(Delegate); | 249 DISALLOW_COPY_AND_ASSIGN(Delegate); |
| 237 }; | 250 }; |
| 238 | 251 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 return CreateInterceptorForPath(POST_INTERCEPT_PATH); | 310 return CreateInterceptorForPath(POST_INTERCEPT_PATH); |
| 298 } | 311 } |
| 299 | 312 |
| 300 URLRequestPostInterceptor* InterceptorFactory::CreateInterceptorForPath( | 313 URLRequestPostInterceptor* InterceptorFactory::CreateInterceptorForPath( |
| 301 const char* url_path) { | 314 const char* url_path) { |
| 302 return URLRequestPostInterceptorFactory::CreateInterceptor( | 315 return URLRequestPostInterceptorFactory::CreateInterceptor( |
| 303 base::FilePath::FromUTF8Unsafe(url_path)); | 316 base::FilePath::FromUTF8Unsafe(url_path)); |
| 304 } | 317 } |
| 305 | 318 |
| 306 } // namespace component_updater | 319 } // namespace component_updater |
| OLD | NEW |