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 83abd4a4e058b9d082400353a7cbbbf248a29d04..fdb8276e031ce52ed09667266dd1f71e8d30c5dd 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 kSinglePageTimeLimitForConcurrentLoadSeconds = 300; |
|
Pete Williamson
2016/10/12 22:33:24
I wonder if we can improve the naming here a bit m
dougarnett
2016/10/13 19:46:44
Done.
|
| const int kRequestExpirationTimeInSeconds = 60 * 60 * 24 * 7; |
| } // namespace |
| @@ -87,8 +88,10 @@ class OfflinerPolicy { |
| } |
| // How long do we allow a page to load before giving up on it |
| - int GetSinglePageTimeLimitInSeconds() const { |
| - return kSinglePageTimeLimitSeconds; |
| + int GetSinglePageTimeLimitInSeconds(bool is_background_scheduled) const { |
|
Pete Williamson
2016/10/12 22:33:24
maybe rename the variable to indicate scheduled_fr
dougarnett
2016/10/13 19:46:44
trying separate methods
|
| + return is_background_scheduled |
| + ? kSinglePageTimeLimitWhenBackgroundScheduledSeconds |
| + : kSinglePageTimeLimitForConcurrentLoadSeconds; |
| } |
| // How long we allow requests to remain in the system before giving up. |