Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: components/offline_pages/core/background/request_coordinator.cc

Issue 2818783002: [Offline pages]: Implement background loader to save on last retry, and record last retry success U… (Closed)
Patch Set: request coordinator update Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..90ff868f07604afe8d3b235ee88a0d687f094a28 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);

Powered by Google App Engine
This is Rietveld 408576698