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

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

Issue 2178143002: Check time budget before starting new requests, and unittest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak time limit names Created 4 years, 5 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 5aba61d08c894416f6e395389d63d78221ff273c..26732acbdc42ba727591b538773e138c4fa2b153 100644
--- a/components/offline_pages/background/offliner_policy.h
+++ b/components/offline_pages/background/offliner_policy.h
@@ -7,8 +7,8 @@
namespace {
const int kMaxRetries = 2;
-const int kBackgroundTimeBudgetSeconds = 170;
-const int kSinglePageTimeBudgetSeconds = 120;
+const int kBackgroundProcessingTimeBudgetSeconds = 170;
+const int kSinglePageTimeLimitSeconds = 120;
const int kMinimumBatteryPercentageForNonUserRequestOfflining = 50;
} // namespace
@@ -68,12 +68,12 @@ class OfflinerPolicy {
// How many seconds to keep trying new pages for, before we give up, and
// return to the scheduler.
int GetBackgroundProcessingTimeBudgetSeconds() const {
- return kBackgroundTimeBudgetSeconds;
+ return kBackgroundProcessingTimeBudgetSeconds;
}
// How long do we allow a page to load before giving up on it
- int GetSinglePageTimeBudgetInSeconds() const {
- return kSinglePageTimeBudgetSeconds;
+ int GetSinglePageTimeLimitInSeconds() const {
+ return kSinglePageTimeLimitSeconds;
}
// How much battery must we have before fetching a page not explicitly
« 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