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

Unified Diff: components/offline_pages/background/offliner_policy.h

Issue 2472593002: Add retries for completed background loading attempts (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | components/offline_pages/background/request_coordinator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/background/offliner_policy.h
diff --git a/components/offline_pages/background/offliner_policy.h b/components/offline_pages/background/offliner_policy.h
index d36de2b07ffd9bcfd3a3792a8fae576ef95992b3..2687ea51d276f632777598ce4877036725f3456f 100644
--- a/components/offline_pages/background/offliner_policy.h
+++ b/components/offline_pages/background/offliner_policy.h
@@ -6,8 +6,15 @@
#define COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_POLICY_H_
namespace {
+// The max number of started tries is to guard against pages that make the
+// prerenderer crash. It should be greater than or equal to the max number of
+// completed tries.
const int kMaxStartedTries = 4;
-const int kMaxCompletedTries = 1;
+// The number of max completed tries is based on Gin2G-poor testing showing that
+// we often need about 4 retries with a 2 minute window, or 3 retries with a 3
dougarnett 2016/11/02 19:28:11 retries => tries here?
Pete Williamson 2016/11/03 18:34:08 Done.
+// minute window.
+const int kMaxCompletedTries = 3;
+// By the time we get to a week, the user has forgotten asking for a page.
const int kRequestExpirationTimeInSeconds = 60 * 60 * 24 * 7;
// Scheduled background processing time limits.
@@ -34,9 +41,9 @@ namespace offline_pages {
class OfflinerPolicy {
public:
OfflinerPolicy()
- : prefer_untried_requests_(false),
+ : prefer_untried_requests_(true),
prefer_earlier_requests_(true),
- retry_count_is_more_important_than_recency_(false),
+ retry_count_is_more_important_than_recency_(true),
max_started_tries_(kMaxStartedTries),
max_completed_tries_(kMaxCompletedTries),
background_scheduled_processing_time_budget_(
« no previous file with comments | « no previous file | components/offline_pages/background/request_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698