Chromium Code Reviews| Index: components/offline_pages/core/background/request_coordinator.cc |
| diff --git a/components/offline_pages/core/background/request_coordinator.cc b/components/offline_pages/core/background/request_coordinator.cc |
| index 167ffa78c7fd557816fe28d4e8f05a0c09afbf37..658846bb52ccee20197be8990b52b6e36ca46210 100644 |
| --- a/components/offline_pages/core/background/request_coordinator.cc |
| +++ b/components/offline_pages/core/background/request_coordinator.cc |
| @@ -61,7 +61,8 @@ void RecordOfflinerResultUMA(const ClientId& client_id, |
| histogram->Add(static_cast<int>(request_status)); |
| // For successful requests also record time from request to save. |
| - if (request_status == Offliner::RequestStatus::SAVED) { |
| + if (request_status == Offliner::RequestStatus::SAVED || |
| + request_status == Offliner::RequestStatus::SAVED_ON_LAST_RETRY) { |
| // Using regular histogram (with dynamic suffix) rather than time-oriented |
| // one to record samples in seconds rather than milliseconds. |
| base::HistogramBase* histogram = base::Histogram::FactoryGet( |
| @@ -964,7 +965,8 @@ void RequestCoordinator::UpdateRequestForCompletedAttempt( |
| // TODO(dougarnett): See if we can conclusively identify other attempt |
| // aborted cases to treat this way (eg, for Render Process Killed). |
| UpdateRequestForAbortedAttempt(request); |
| - } else if (status == Offliner::RequestStatus::SAVED) { |
| + } else if (status == Offliner::RequestStatus::SAVED || |
| + status == Offliner::RequestStatus::SAVED_ON_LAST_RETRY) { |
| // Remove the request from the queue if it succeeded. |
| RemoveAttemptedRequest(request, |
| RequestNotifier::BackgroundSavePageResult::SUCCESS); |
| @@ -1002,6 +1004,7 @@ bool RequestCoordinator::ShouldTryNextRequest( |
| case Offliner::RequestStatus::REQUEST_COORDINATOR_TIMED_OUT: |
| case Offliner::RequestStatus::LOADING_FAILED: |
| case Offliner::RequestStatus::LOADING_FAILED_NO_RETRY: |
| + case Offliner::RequestStatus::SAVED_ON_LAST_RETRY: |
|
fgorski
2017/04/17 17:48:59
Let's bind this to a check for immediate vs. sched
chili
2017/04/17 19:37:52
done.
I remember we talked about some additional
|
| return true; |
| case Offliner::RequestStatus::FOREGROUND_CANCELED: |
| case Offliner::RequestStatus::LOADING_CANCELED: |