Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: net/url_request/url_fetcher_core.cc

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/quic_test_utils.h ('k') | net/url_request/url_request_file_dir_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698