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

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

Issue 2420503002: [Offline Pages] Define separate watchdog timeout for concurrent bg loads (Closed)
Patch Set: Cleaned up 16 lint errors from "git cl lint" Created 4 years, 2 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
« no previous file with comments | « no previous file | components/offline_pages/background/request_coordinator.h » ('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 83abd4a4e058b9d082400353a7cbbbf248a29d04..a82f5e68715a150a86a1dd4ec4d1f1b7755bd974 100644
--- a/components/offline_pages/background/offliner_policy.h
+++ b/components/offline_pages/background/offliner_policy.h
@@ -9,7 +9,8 @@ namespace {
const int kMaxStartedTries = 4;
const int kMaxCompletedTries = 1;
const int kBackgroundProcessingTimeBudgetSeconds = 170;
-const int kSinglePageTimeLimitSeconds = 120;
+const int kSinglePageTimeLimitWhenBackgroundScheduledSeconds = 120;
+const int kSinglePageTimeLimitForImmediateLoadSeconds = 300;
const int kRequestExpirationTimeInSeconds = 60 * 60 * 24 * 7;
} // namespace
@@ -86,9 +87,16 @@ class OfflinerPolicy {
return kBackgroundProcessingTimeBudgetSeconds;
}
- // How long do we allow a page to load before giving up on it
- int GetSinglePageTimeLimitInSeconds() const {
- return kSinglePageTimeLimitSeconds;
+ // How long do we allow a page to load before giving up on it when
+ // background loading was scheduled.
+ int GetSinglePageTimeLimitWhenBackgroundScheduledInSeconds() const {
+ return kSinglePageTimeLimitWhenBackgroundScheduledSeconds;
+ }
+
+ // How long do we allow a page to load before giving up on it when
+ // immediately background loading.
+ int GetSinglePageTimeLimitForImmediateLoadInSeconds() const {
+ return kSinglePageTimeLimitForImmediateLoadSeconds;
}
// How long we allow requests to remain in the system before giving up.
@@ -103,6 +111,7 @@ class OfflinerPolicy {
int max_started_tries_;
int max_completed_tries_;
};
-}
+} // namespace offline_pages
+
#endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_POLICY_H_
« no previous file with comments | « no previous file | components/offline_pages/background/request_coordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698