| 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 #ifndef COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_ | 5 #ifndef COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_ |
| 6 #define COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_ | 6 #define COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 // the specified URL using the specified request context. | 257 // the specified URL using the specified request context. |
| 258 Fetcher(net::URLRequestContextGetter* request_context, | 258 Fetcher(net::URLRequestContextGetter* request_context, |
| 259 const GURL& url, | 259 const GURL& url, |
| 260 const std::string& referrer, | 260 const std::string& referrer, |
| 261 const base::Callback<void(const Fetcher&)>& callback, | 261 const base::Callback<void(const Fetcher&)>& callback, |
| 262 bool is_resource_request, | 262 bool is_resource_request, |
| 263 size_t max_bytes); | 263 size_t max_bytes); |
| 264 ~Fetcher() override; | 264 ~Fetcher() override; |
| 265 void OnURLFetchDownloadProgress(const net::URLFetcher* source, | 265 void OnURLFetchDownloadProgress(const net::URLFetcher* source, |
| 266 int64_t current, | 266 int64_t current, |
| 267 int64_t total) override; | 267 int64_t total, |
| 268 int64_t current_network_bytes) override; |
| 268 void OnURLFetchComplete(const net::URLFetcher* source) override; | 269 void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 269 int64_t response_bytes() const { return response_bytes_; } | 270 int64_t response_bytes() const { return response_bytes_; } |
| 270 int64_t network_response_bytes() const { return network_response_bytes_; } | 271 int64_t network_response_bytes() const { return network_response_bytes_; } |
| 271 const net::URLFetcher* network_url_fetcher() const { | 272 const net::URLFetcher* network_url_fetcher() const { |
| 272 return network_url_fetcher_.get(); | 273 return network_url_fetcher_.get(); |
| 273 } | 274 } |
| 274 const GURL& url() const { return url_; } | 275 const GURL& url() const { return url_; } |
| 275 const std::string& referrer() const { return referrer_; } | 276 const std::string& referrer() const { return referrer_; } |
| 276 bool is_resource_request() const { return is_resource_request_; } | 277 bool is_resource_request() const { return is_resource_request_; } |
| 277 bool was_cached() const { return was_cached_; } | 278 bool was_cached() const { return was_cached_; } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 296 int64_t response_bytes_; | 297 int64_t response_bytes_; |
| 297 int64_t network_response_bytes_; | 298 int64_t network_response_bytes_; |
| 298 bool was_cached_; | 299 bool was_cached_; |
| 299 | 300 |
| 300 DISALLOW_COPY_AND_ASSIGN(Fetcher); | 301 DISALLOW_COPY_AND_ASSIGN(Fetcher); |
| 301 }; | 302 }; |
| 302 | 303 |
| 303 } // namespace precache | 304 } // namespace precache |
| 304 | 305 |
| 305 #endif // COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_ | 306 #endif // COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_ |
| OLD | NEW |