Commit 481372c4 authored by Majid Valipour's avatar Majid Valipour Committed by Commit Bot

WebOTP: Remove extraneous call to TimeTicks:Now

TimeTicks::Now() is fairly cheap but not calling it twice is even
cheaper.

This CL is expected to have no functional impact.

Change-Id: I3b230d1ff22d29e88b594205c825bcbe68b6f558
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252746
Auto-Submit: Majid Valipour <majidvp@chromium.org>
Reviewed-by: default avatarSam Goto <goto@chromium.org>
Commit-Queue: Sam Goto <goto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780427}
parent eda9f73c
......@@ -103,7 +103,8 @@ void SmsService::OnReceive(const std::string& one_time_code) {
DCHECK(!one_time_code_);
DCHECK(!start_time_.is_null());
RecordSmsReceiveTime(base::TimeTicks::Now() - start_time_);
auto now = base::TimeTicks::Now();
RecordSmsReceiveTime(now - start_time_);
one_time_code_ = one_time_code;
......@@ -114,7 +115,7 @@ void SmsService::OnReceive(const std::string& one_time_code) {
return;
}
receive_time_ = base::TimeTicks::Now();
receive_time_ = now;
OpenInfoBar(one_time_code);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment