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

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

Issue 2218403002: Change database scheme - add state and start tracking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete old database if any Created 4 years, 4 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/background/request_coordinator.cc
diff --git a/components/offline_pages/background/request_coordinator.cc b/components/offline_pages/background/request_coordinator.cc
index 19906d787e04ab3d617c23b9e6e6c912599b289f..a20341e87f17bead8ff5ff93e500afbe6c71029c 100644
--- a/components/offline_pages/background/request_coordinator.cc
+++ b/components/offline_pages/background/request_coordinator.cc
@@ -281,7 +281,8 @@ void RequestCoordinator::OfflinerDoneCallback(const SavePageRequest& request,
updated_request.client_id()));
} else if (status == Offliner::RequestStatus::SAVED ||
- request.attempt_count() >= policy_->GetMaxTries()) {
+ request.completed_attempt_count() + 1 >=
fgorski 2016/08/08 17:48:05 What is going on with the +1. Please explain it.
Pete Williamson 2016/08/08 18:44:28 comment added.
+ policy_->GetMaxCompletedTries()) {
fgorski 2016/08/08 17:48:05 Do you plan to check for GetMaxStartedTries() here
Pete Williamson 2016/08/08 18:44:28 Checking GetMaxStartedTries is coming in a future
// Remove the request from the queue if it either succeeded or exceeded the
// max number of retries.
queue_->RemoveRequest(

Powered by Google App Engine
This is Rietveld 408576698