Commit 8f4066b0 authored by David Bertoni's avatar David Bertoni Committed by Commit Bot

[Extensions] Remove UpdateCheckInfo constructor.

The conditional check for a null pointer value for g_test_clock
is unnecessary, since the constructor of net::BackoffEntry will
initialize the value to a nullptr anyway. This allowed removing
the constructor completely.

Change-Id: I02d62a79aba3257f50a0d5aae91d54ec9a612e9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2430449Reviewed-by: default avatarKelvin Jiang <kelvinjiang@chromium.org>
Commit-Queue: David Bertoni <dbertoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811502}
parent 6bb83a1d
...@@ -122,16 +122,8 @@ const base::TickClock* g_test_clock = nullptr; ...@@ -122,16 +122,8 @@ const base::TickClock* g_test_clock = nullptr;
} // namespace } // namespace
struct ChromeRuntimeAPIDelegate::UpdateCheckInfo { struct ChromeRuntimeAPIDelegate::UpdateCheckInfo {
public: std::unique_ptr<net::BackoffEntry> backoff =
UpdateCheckInfo() { std::make_unique<net::BackoffEntry>(BackoffPolicy::Get(), g_test_clock);
if (g_test_clock)
backoff.reset(
new net::BackoffEntry(BackoffPolicy::Get(), g_test_clock));
else
backoff.reset(new net::BackoffEntry(BackoffPolicy::Get()));
}
std::unique_ptr<net::BackoffEntry> backoff;
std::vector<UpdateCheckCallback> callbacks; std::vector<UpdateCheckCallback> callbacks;
}; };
......
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