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

Unified Diff: components/update_client/background_downloader_win.cc

Issue 2336913003: Mechanical change of base::Time to base::TimeTicks in the component updater. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « components/update_client/background_downloader_win.h ('k') | components/update_client/crx_update_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/background_downloader_win.cc
diff --git a/components/update_client/background_downloader_win.cc b/components/update_client/background_downloader_win.cc
index 4d3790ed0b42347092eb434096bf302269bc3953..857e2bb44160b112e4fa8644aca66fd7475cabca 100644
--- a/components/update_client/background_downloader_win.cc
+++ b/components/update_client/background_downloader_win.cc
@@ -460,7 +460,7 @@ void BackgroundDownloader::DoStartDownload(const GURL& url) {
void BackgroundDownloader::BeginDownload(const GURL& url) {
DCHECK(task_runner()->RunsTasksOnCurrentThread());
- download_start_time_ = base::Time::Now();
+ download_start_time_ = base::TimeTicks::Now();
job_stuck_begin_time_ = download_start_time_;
HRESULT hr = BeginDownloadHelper(url);
@@ -573,7 +573,7 @@ void BackgroundDownloader::EndDownload(HRESULT error) {
DCHECK(!TimerIsRunning());
- const base::Time download_end_time(base::Time::Now());
+ const base::TimeTicks download_end_time(base::TimeTicks::Now());
const base::TimeDelta download_time =
download_end_time >= download_start_time_
? download_end_time - download_start_time_
@@ -691,7 +691,7 @@ bool BackgroundDownloader::OnStateQueued() {
bool BackgroundDownloader::OnStateTransferring() {
// Resets the baseline for detecting a stuck job since the job is transferring
// data and it is making progress.
- job_stuck_begin_time_ = base::Time::Now();
+ job_stuck_begin_time_ = base::TimeTicks::Now();
int64_t downloaded_bytes = -1;
int64_t total_bytes = -1;
@@ -800,7 +800,7 @@ HRESULT BackgroundDownloader::InitializeNewJob(
bool BackgroundDownloader::IsStuck() {
const base::TimeDelta job_stuck_timeout(
base::TimeDelta::FromMinutes(kJobStuckTimeoutMin));
- return job_stuck_begin_time_ + job_stuck_timeout < base::Time::Now();
+ return job_stuck_begin_time_ + job_stuck_timeout < base::TimeTicks::Now();
}
HRESULT BackgroundDownloader::CompleteJob() {
« no previous file with comments | « components/update_client/background_downloader_win.h ('k') | components/update_client/crx_update_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698