| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file contains URLFetcher, a wrapper around net::URLRequest that handles | 5 // This file contains URLFetcher, a wrapper around net::URLRequest that handles |
| 6 // low-level details like thread safety, ref counting, and incremental buffer | 6 // low-level details like thread safety, ref counting, and incremental buffer |
| 7 // reading. This is useful for callers who simply want to get the data from a | 7 // reading. This is useful for callers who simply want to get the data from a |
| 8 // URL and don't care about all the nitty-gritty details. | 8 // URL and don't care about all the nitty-gritty details. |
| 9 // | 9 // |
| 10 // NOTE(willchan): Only one "IO" thread is supported for URLFetcher. This is a | 10 // NOTE(willchan): Only one "IO" thread is supported for URLFetcher. This is a |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 virtual int GetMaxRetries() const OVERRIDE; | 55 virtual int GetMaxRetries() const OVERRIDE; |
| 56 virtual base::TimeDelta GetBackoffDelay() const OVERRIDE; | 56 virtual base::TimeDelta GetBackoffDelay() const OVERRIDE; |
| 57 virtual void SaveResponseToTemporaryFile( | 57 virtual void SaveResponseToTemporaryFile( |
| 58 scoped_refptr<base::MessageLoopProxy> file_message_loop_proxy) OVERRIDE; | 58 scoped_refptr<base::MessageLoopProxy> file_message_loop_proxy) OVERRIDE; |
| 59 virtual net::HttpResponseHeaders* GetResponseHeaders() const OVERRIDE; | 59 virtual net::HttpResponseHeaders* GetResponseHeaders() const OVERRIDE; |
| 60 virtual net::HostPortPair GetSocketAddress() const OVERRIDE; | 60 virtual net::HostPortPair GetSocketAddress() const OVERRIDE; |
| 61 virtual bool WasFetchedViaProxy() const OVERRIDE; | 61 virtual bool WasFetchedViaProxy() const OVERRIDE; |
| 62 virtual void Start() OVERRIDE; | 62 virtual void Start() OVERRIDE; |
| 63 virtual void StartWithRequestContextGetter( | 63 virtual void StartWithRequestContextGetter( |
| 64 net::URLRequestContextGetter* request_context_getter) OVERRIDE; | 64 net::URLRequestContextGetter* request_context_getter) OVERRIDE; |
| 65 virtual const GURL& GetOriginalUrl() const OVERRIDE; | 65 virtual const GURL& GetOriginalURL() const OVERRIDE; |
| 66 virtual const GURL& GetUrl() const OVERRIDE; | 66 virtual const GURL& GetURL() const OVERRIDE; |
| 67 virtual const net::URLRequestStatus& GetStatus() const OVERRIDE; | 67 virtual const net::URLRequestStatus& GetStatus() const OVERRIDE; |
| 68 virtual int GetResponseCode() const OVERRIDE; | 68 virtual int GetResponseCode() const OVERRIDE; |
| 69 virtual const net::ResponseCookies& GetCookies() const OVERRIDE; | 69 virtual const net::ResponseCookies& GetCookies() const OVERRIDE; |
| 70 virtual bool FileErrorOccurred( | 70 virtual bool FileErrorOccurred( |
| 71 base::PlatformFileError* out_error_code) const OVERRIDE; | 71 base::PlatformFileError* out_error_code) const OVERRIDE; |
| 72 virtual void ReceivedContentWasMalformed() OVERRIDE; | 72 virtual void ReceivedContentWasMalformed() OVERRIDE; |
| 73 virtual bool GetResponseAsString( | 73 virtual bool GetResponseAsString( |
| 74 std::string* out_response_string) const OVERRIDE; | 74 std::string* out_response_string) const OVERRIDE; |
| 75 virtual bool GetResponseAsFilePath( | 75 virtual bool GetResponseAsFilePath( |
| 76 bool take_ownership, | 76 bool take_ownership, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // NOTE: for safety, this should only be used through ScopedURLFetcherFactory! | 115 // NOTE: for safety, this should only be used through ScopedURLFetcherFactory! |
| 116 static void set_factory(content::URLFetcherFactory* factory); | 116 static void set_factory(content::URLFetcherFactory* factory); |
| 117 | 117 |
| 118 class Core; | 118 class Core; |
| 119 scoped_refptr<Core> core_; | 119 scoped_refptr<Core> core_; |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); | 121 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 #endif // CONTENT_COMMON_NET_URL_FETCHER_IMPL_H_ | 124 #endif // CONTENT_COMMON_NET_URL_FETCHER_IMPL_H_ |
| OLD | NEW |