Commit 704b61b3 authored by Matt Giuca's avatar Matt Giuca Committed by Commit Bot

Revert "[Background Sync] Show updated delay in Devtools."

This reverts commit b302b4c7.

Reason for revert: Introduces test flake (https://crbug.com/990207)

Original change's description:
> [Background Sync] Show updated delay in Devtools.
> 
> We sometimes change the actual delay after which a periodicsync event is fired
> based on other registrations for the origin. Update what we show in Devtools so
> it corresponds to the actual delay_until set on the registration.
> 
> Bug: 989524
> Change-Id: I9ba06f9c5f65d93775b0a9bf9d934f1d9b5b5ce6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730921
> Reviewed-by: Rayan Kanso <rayankans@chromium.org>
> Commit-Queue: Mugdha Lakhani <nator@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#683298}

TBR=nator@chromium.org,rayankans@chromium.org

Change-Id: If6c1b97d518011b5960e4a095ad6f2a67b3907f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 989524, 990207
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1731338Reviewed-by: default avatarMatt Giuca <mgiuca@chromium.org>
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683463}
parent 8434b936
...@@ -918,8 +918,7 @@ void BackgroundSyncManager::RegisterDidGetDelay( ...@@ -918,8 +918,7 @@ void BackgroundSyncManager::RegisterDidGetDelay(
DevToolsBackgroundService::kPeriodicBackgroundSync, DevToolsBackgroundService::kPeriodicBackgroundSync,
/* event_name= */ "Got next event delay", /* event_name= */ "Got next event delay",
/* instance_id= */ registration.options()->tag, /* instance_id= */ registration.options()->tag,
{{"Next Attempt Delay (ms)", {{"Next Attempt Delay (ms)", GetDelayAsString(delay)}});
GetDelayAsString(registration.delay_until() - clock_->Now())}});
} }
AddOrUpdateActiveRegistration( AddOrUpdateActiveRegistration(
...@@ -1981,8 +1980,7 @@ void BackgroundSyncManager::EventCompleteDidGetDelay( ...@@ -1981,8 +1980,7 @@ void BackgroundSyncManager::EventCompleteDidGetDelay(
std::string event_name = GetSyncEventName(registration->sync_type()) + std::string event_name = GetSyncEventName(registration->sync_type()) +
(succeeded ? " event completed" : " event failed"); (succeeded ? " event completed" : " event failed");
std::map<std::string, std::string> event_metadata = { std::map<std::string, std::string> event_metadata = {
{"Next Attempt Delay (ms)", {"Next Attempt Delay (ms)", GetDelayAsString(delay)}};
GetDelayAsString(registration->delay_until() - clock_->Now())}};
if (!succeeded) { if (!succeeded) {
event_metadata.emplace("Failure Reason", event_metadata.emplace("Failure Reason",
GetEventStatusString(status_code)); GetEventStatusString(status_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