Commit a9a15315 authored by Matt Mueller's avatar Matt Mueller Committed by Commit Bot

net::RecordingTestNetLog should record the observed entry.time, not the time OnAddEntry was called.

Change-Id: I058cb3934c96b38ff4bddea0192c8b36297b4abe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2028754
Commit-Queue: Matt Menke <mmenke@chromium.org>
Auto-Submit: Matt Mueller <mattm@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736588}
parent 98011cb0
......@@ -67,11 +67,10 @@ void RecordingTestNetLog::Clear() {
void RecordingTestNetLog::OnAddEntry(const NetLogEntry& entry) {
base::Value params = entry.params.Clone();
auto time = base::TimeTicks::Now();
// Only need to acquire the lock when accessing class variables.
base::AutoLock lock(lock_);
entry_list_.emplace_back(entry.type, entry.source, entry.phase, time,
entry_list_.emplace_back(entry.type, entry.source, entry.phase, entry.time,
std::move(params));
}
......
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