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

Unified Diff: content/browser/loader/upload_progress_tracker.cc

Issue 2491613004: Make base::Timer sequence-friendly. (Closed)
Patch Set: add back commented out DCHECK in Stop() Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/upload_progress_tracker.cc
diff --git a/content/browser/loader/upload_progress_tracker.cc b/content/browser/loader/upload_progress_tracker.cc
index 6633e61b7ec89abd148cd6249f49496b0ad24f25..f9fe05ba04ad43c8be94b72c60bc255c70016744 100644
--- a/content/browser/loader/upload_progress_tracker.cc
+++ b/content/browser/loader/upload_progress_tracker.cc
@@ -19,7 +19,7 @@ UploadProgressTracker::UploadProgressTracker(
const tracked_objects::Location& location,
UploadProgressReportCallback report_progress,
net::URLRequest* request,
- scoped_refptr<base::SingleThreadTaskRunner> task_runner)
+ scoped_refptr<base::SequencedTaskRunner> task_runner)
: request_(request), report_progress_(std::move(report_progress)) {
DCHECK(report_progress_);
@@ -40,6 +40,11 @@ void UploadProgressTracker::OnUploadCompleted() {
progress_timer_.Stop();
}
+// static
+base::TimeDelta UploadProgressTracker::GetUploadProgressIntervalForTesting() {
+ return kUploadProgressInterval;
+}
+
base::TimeTicks UploadProgressTracker::GetCurrentTime() const {
return base::TimeTicks::Now();
}
« no previous file with comments | « content/browser/loader/upload_progress_tracker.h ('k') | content/browser/loader/upload_progress_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698