| 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_URL_FETCHER_CORE_H_ | 5 #ifndef NET_URL_REQUEST_URL_FETCHER_CORE_H_ |
| 6 #define NET_URL_REQUEST_URL_FETCHER_CORE_H_ | 6 #define NET_URL_REQUEST_URL_FETCHER_CORE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/debug/stack_trace.h" | |
| 16 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 17 #include "base/lazy_instance.h" | 16 #include "base/lazy_instance.h" |
| 18 #include "base/macros.h" | 17 #include "base/macros.h" |
| 19 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 20 #include "base/timer/timer.h" | 19 #include "base/timer/timer.h" |
| 21 #include "net/base/chunked_upload_data_stream.h" | 20 #include "net/base/chunked_upload_data_stream.h" |
| 22 #include "net/base/host_port_pair.h" | 21 #include "net/base/host_port_pair.h" |
| 23 #include "net/http/http_request_headers.h" | 22 #include "net/http/http_request_headers.h" |
| 24 #include "net/url_request/url_fetcher.h" | 23 #include "net/url_request/url_fetcher.h" |
| 25 #include "net/url_request/url_request.h" | 24 #include "net/url_request/url_request.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 // Timer to poll the progress of uploading for POST and PUT requests. | 339 // Timer to poll the progress of uploading for POST and PUT requests. |
| 341 // When crbug.com/119629 is fixed, scoped_ptr is not necessary here. | 340 // When crbug.com/119629 is fixed, scoped_ptr is not necessary here. |
| 342 std::unique_ptr<base::RepeatingTimer> upload_progress_checker_timer_; | 341 std::unique_ptr<base::RepeatingTimer> upload_progress_checker_timer_; |
| 343 // Number of bytes sent so far. | 342 // Number of bytes sent so far. |
| 344 int64_t current_upload_bytes_; | 343 int64_t current_upload_bytes_; |
| 345 // Number of bytes received so far. | 344 // Number of bytes received so far. |
| 346 int64_t current_response_bytes_; | 345 int64_t current_response_bytes_; |
| 347 // Total expected bytes to receive (-1 if it cannot be determined). | 346 // Total expected bytes to receive (-1 if it cannot be determined). |
| 348 int64_t total_response_bytes_; | 347 int64_t total_response_bytes_; |
| 349 | 348 |
| 350 // TODO(willchan): Get rid of this after debugging crbug.com/90971. | |
| 351 base::debug::StackTrace stack_trace_; | |
| 352 | |
| 353 static base::LazyInstance<Registry> g_registry; | 349 static base::LazyInstance<Registry> g_registry; |
| 354 | 350 |
| 355 DISALLOW_COPY_AND_ASSIGN(URLFetcherCore); | 351 DISALLOW_COPY_AND_ASSIGN(URLFetcherCore); |
| 356 }; | 352 }; |
| 357 | 353 |
| 358 } // namespace net | 354 } // namespace net |
| 359 | 355 |
| 360 #endif // NET_URL_REQUEST_URL_FETCHER_CORE_H_ | 356 #endif // NET_URL_REQUEST_URL_FETCHER_CORE_H_ |
| OLD | NEW |