| 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 // This file contains URLFetcher, a wrapper around URLRequest that handles | 5 // This file contains URLFetcher, a wrapper around 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 void SaveResponseToTemporaryFile( | 78 void SaveResponseToTemporaryFile( |
| 79 scoped_refptr<base::SequencedTaskRunner> file_task_runner) override; | 79 scoped_refptr<base::SequencedTaskRunner> file_task_runner) override; |
| 80 void SaveResponseWithWriter( | 80 void SaveResponseWithWriter( |
| 81 scoped_ptr<URLFetcherResponseWriter> response_writer) override; | 81 scoped_ptr<URLFetcherResponseWriter> response_writer) override; |
| 82 HttpResponseHeaders* GetResponseHeaders() const override; | 82 HttpResponseHeaders* GetResponseHeaders() const override; |
| 83 HostPortPair GetSocketAddress() const override; | 83 HostPortPair GetSocketAddress() const override; |
| 84 bool WasFetchedViaProxy() const override; | 84 bool WasFetchedViaProxy() const override; |
| 85 bool WasCached() const override; | 85 bool WasCached() const override; |
| 86 int64_t GetReceivedResponseContentLength() const override; | 86 int64_t GetReceivedResponseContentLength() const override; |
| 87 int64_t GetTotalReceivedBytes() const override; | 87 int64_t GetTotalReceivedBytes() const override; |
| 88 int64 GetBytesReceivedSize() const override; |
| 89 int64 GetBytesSentSize() const override; |
| 88 void Start() override; | 90 void Start() override; |
| 89 const GURL& GetOriginalURL() const override; | 91 const GURL& GetOriginalURL() const override; |
| 90 const GURL& GetURL() const override; | 92 const GURL& GetURL() const override; |
| 91 const URLRequestStatus& GetStatus() const override; | 93 const URLRequestStatus& GetStatus() const override; |
| 92 int GetResponseCode() const override; | 94 int GetResponseCode() const override; |
| 93 const ResponseCookies& GetCookies() const override; | 95 const ResponseCookies& GetCookies() const override; |
| 94 void ReceivedContentWasMalformed() override; | 96 void ReceivedContentWasMalformed() override; |
| 95 bool GetResponseAsString(std::string* out_response_string) const override; | 97 bool GetResponseAsString(std::string* out_response_string) const override; |
| 96 bool GetResponseAsFilePath(bool take_ownership, | 98 bool GetResponseAsFilePath(bool take_ownership, |
| 97 base::FilePath* out_response_path) const override; | 99 base::FilePath* out_response_path) const override; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 124 static int GetNumFetcherCores(); | 126 static int GetNumFetcherCores(); |
| 125 | 127 |
| 126 const scoped_refptr<URLFetcherCore> core_; | 128 const scoped_refptr<URLFetcherCore> core_; |
| 127 | 129 |
| 128 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); | 130 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); |
| 129 }; | 131 }; |
| 130 | 132 |
| 131 } // namespace net | 133 } // namespace net |
| 132 | 134 |
| 133 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ | 135 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ |
| OLD | NEW |