| 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_TEST_URL_FETCHER_FACTORY_H_ | 5 #ifndef NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ |
| 6 #define NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ | 6 #define NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
| 17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "base/threading/non_thread_safe.h" | 19 #include "base/threading/non_thread_safe.h" |
| 20 #include "googleurl/src/gurl.h" | |
| 21 #include "net/http/http_request_headers.h" | 20 #include "net/http/http_request_headers.h" |
| 22 #include "net/url_request/url_fetcher_factory.h" | 21 #include "net/url_request/url_fetcher_factory.h" |
| 23 #include "net/url_request/url_request_status.h" | 22 #include "net/url_request/url_request_status.h" |
| 23 #include "url/gurl.h" |
| 24 | 24 |
| 25 namespace net { | 25 namespace net { |
| 26 | 26 |
| 27 // Changes URLFetcher's Factory for the lifetime of the object. | 27 // Changes URLFetcher's Factory for the lifetime of the object. |
| 28 // Note that this scoper cannot be nested (to make it even harder to misuse). | 28 // Note that this scoper cannot be nested (to make it even harder to misuse). |
| 29 class ScopedURLFetcherFactory : public base::NonThreadSafe { | 29 class ScopedURLFetcherFactory : public base::NonThreadSafe { |
| 30 public: | 30 public: |
| 31 explicit ScopedURLFetcherFactory(URLFetcherFactory* factory); | 31 explicit ScopedURLFetcherFactory(URLFetcherFactory* factory); |
| 32 virtual ~ScopedURLFetcherFactory(); | 32 virtual ~ScopedURLFetcherFactory(); |
| 33 | 33 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 int id, | 413 int id, |
| 414 const GURL& url, | 414 const GURL& url, |
| 415 URLFetcher::RequestType request_type, | 415 URLFetcher::RequestType request_type, |
| 416 URLFetcherDelegate* d) OVERRIDE; | 416 URLFetcherDelegate* d) OVERRIDE; |
| 417 | 417 |
| 418 }; | 418 }; |
| 419 | 419 |
| 420 } // namespace net | 420 } // namespace net |
| 421 | 421 |
| 422 #endif // NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ | 422 #endif // NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ |
| OLD | NEW |