| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 HostPortPair GetSocketAddress() const override; | 82 HostPortPair GetSocketAddress() const override; |
| 83 bool WasFetchedViaProxy() const override; | 83 bool WasFetchedViaProxy() const override; |
| 84 bool WasCached() const override; | 84 bool WasCached() const override; |
| 85 int64_t GetReceivedResponseContentLength() const override; | 85 int64_t GetReceivedResponseContentLength() const override; |
| 86 int64_t GetTotalReceivedBytes() const override; | 86 int64_t GetTotalReceivedBytes() const override; |
| 87 void Start() override; | 87 void Start() override; |
| 88 const GURL& GetOriginalURL() const override; | 88 const GURL& GetOriginalURL() const override; |
| 89 const GURL& GetURL() const override; | 89 const GURL& GetURL() const override; |
| 90 const URLRequestStatus& GetStatus() const override; | 90 const URLRequestStatus& GetStatus() const override; |
| 91 int GetResponseCode() const override; | 91 int GetResponseCode() const override; |
| 92 const ResponseCookies& GetCookies() const override; | |
| 93 void ReceivedContentWasMalformed() override; | 92 void ReceivedContentWasMalformed() override; |
| 94 bool GetResponseAsString(std::string* out_response_string) const override; | 93 bool GetResponseAsString(std::string* out_response_string) const override; |
| 95 bool GetResponseAsFilePath(bool take_ownership, | 94 bool GetResponseAsFilePath(bool take_ownership, |
| 96 base::FilePath* out_response_path) const override; | 95 base::FilePath* out_response_path) const override; |
| 97 | 96 |
| 98 static void CancelAll(); | 97 static void CancelAll(); |
| 99 | 98 |
| 100 static void SetIgnoreCertificateRequests(bool ignored); | 99 static void SetIgnoreCertificateRequests(bool ignored); |
| 101 | 100 |
| 102 // TODO(akalin): Make these private again once URLFetcher::Create() | 101 // TODO(akalin): Make these private again once URLFetcher::Create() |
| (...skipping 20 matching lines...) Expand all Loading... |
| 123 static int GetNumFetcherCores(); | 122 static int GetNumFetcherCores(); |
| 124 | 123 |
| 125 const scoped_refptr<URLFetcherCore> core_; | 124 const scoped_refptr<URLFetcherCore> core_; |
| 126 | 125 |
| 127 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); | 126 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); |
| 128 }; | 127 }; |
| 129 | 128 |
| 130 } // namespace net | 129 } // namespace net |
| 131 | 130 |
| 132 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ | 131 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ |
| OLD | NEW |