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 #include "net/url_request/url_fetcher_core.h" | 5 #include "net/url_request/url_fetcher_core.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 } | 924 } |
925 | 925 |
926 void URLFetcherCore::InformDelegateUploadProgressInDelegateThread( | 926 void URLFetcherCore::InformDelegateUploadProgressInDelegateThread( |
927 int64 current, int64 total) { | 927 int64 current, int64 total) { |
928 DCHECK(delegate_task_runner_->BelongsToCurrentThread()); | 928 DCHECK(delegate_task_runner_->BelongsToCurrentThread()); |
929 if (delegate_) | 929 if (delegate_) |
930 delegate_->OnURLFetchUploadProgress(fetcher_, current, total); | 930 delegate_->OnURLFetchUploadProgress(fetcher_, current, total); |
931 } | 931 } |
932 | 932 |
933 void URLFetcherCore::InformDelegateDownloadProgress() { | 933 void URLFetcherCore::InformDelegateDownloadProgress() { |
| 934 // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. |
| 935 tracked_objects::ScopedTracker tracking_profile1( |
| 936 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 937 "423948 URLFetcherCore::InformDelegateDownloadProgress1")); |
| 938 |
934 DCHECK(network_task_runner_->BelongsToCurrentThread()); | 939 DCHECK(network_task_runner_->BelongsToCurrentThread()); |
| 940 |
| 941 // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. |
| 942 tracked_objects::ScopedTracker tracking_profile2( |
| 943 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 944 "423948 URLFetcherCore::InformDelegateDownloadProgress2")); |
| 945 |
935 delegate_task_runner_->PostTask( | 946 delegate_task_runner_->PostTask( |
936 FROM_HERE, | 947 FROM_HERE, |
937 base::Bind( | 948 base::Bind( |
938 &URLFetcherCore::InformDelegateDownloadProgressInDelegateThread, | 949 &URLFetcherCore::InformDelegateDownloadProgressInDelegateThread, |
939 this, current_response_bytes_, total_response_bytes_)); | 950 this, current_response_bytes_, total_response_bytes_)); |
940 } | 951 } |
941 | 952 |
942 void URLFetcherCore::InformDelegateDownloadProgressInDelegateThread( | 953 void URLFetcherCore::InformDelegateDownloadProgressInDelegateThread( |
943 int64 current, int64 total) { | 954 int64 current, int64 total) { |
944 DCHECK(delegate_task_runner_->BelongsToCurrentThread()); | 955 DCHECK(delegate_task_runner_->BelongsToCurrentThread()); |
945 if (delegate_) | 956 if (delegate_) |
946 delegate_->OnURLFetchDownloadProgress(fetcher_, current, total); | 957 delegate_->OnURLFetchDownloadProgress(fetcher_, current, total); |
947 } | 958 } |
948 | 959 |
949 } // namespace net | 960 } // namespace net |
OLD | NEW |