Chromium Code Reviews| 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..f914cb6b3ac981324a512e8cd54e9852fc61b1a3 100644 |
| --- a/components/offline_pages/background/offliner_policy.h |
| +++ b/components/offline_pages/background/offliner_policy.h |
| @@ -10,6 +10,7 @@ const int kMaxRetries = 2; |
| const int kBackgroundTimeBudgetSeconds = 170; |
| const int kSinglePageTimeBudgetSeconds = 120; |
| const int kMinimumBatteryPercentageForNonUserRequestOfflining = 50; |
| +const int kPageExpirationTimeInSeconds = 60 * 60 * 24 * 7; |
| } // namespace |
| namespace offline_pages { |
| @@ -58,7 +59,7 @@ class OfflinerPolicy { |
| bool UnmeteredNetworkRequiredForNonUserRequestedPage() const { return true; } |
| - int BatteryPercentageRequiredForUserRequestedPage() const { return 50; } |
| + int BatteryPercentageRequiredForUserRequestedPage() const { return 0; } |
| // This is so low because we require the device to be plugged in and charging. |
| // If we decide to allow non-user requested pages when not plugged in, we |
| @@ -76,6 +77,11 @@ class OfflinerPolicy { |
| return kSinglePageTimeBudgetSeconds; |
| } |
| + // How long we allow requests to remain in the system before giving up. |
| + int GetPageExpirationTimeInSeconds() const { |
|
dougarnett
2016/07/27 15:45:13
Actually seems to be "Request" expiration rather t
Pete Williamson
2016/07/27 17:20:06
Done.
|
| + return kPageExpirationTimeInSeconds; |
| + } |
| + |
| // How much battery must we have before fetching a page not explicitly |
| // requested by the user? |
| int GetMinimumBatteryPercentageForNonUserRequestOfflining() const { |