OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_POLICY_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_POLICY_H_ |
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_POLICY_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_POLICY_H_ |
7 | 7 |
8 namespace { | 8 namespace { |
9 const int kMaxStartedTries = 5; | 9 const int kMaxStartedTries = 4; |
10 const int kMaxCompletedTries = 1; | 10 const int kMaxCompletedTries = 1; |
11 const int kBackgroundProcessingTimeBudgetSeconds = 170; | 11 const int kBackgroundProcessingTimeBudgetSeconds = 170; |
12 const int kSinglePageTimeLimitSeconds = 120; | 12 const int kSinglePageTimeLimitSeconds = 120; |
13 const int kMinimumBatteryPercentageForNonUserRequestOfflining = 50; | 13 const int kMinimumBatteryPercentageForNonUserRequestOfflining = 50; |
14 const int kRequestExpirationTimeInSeconds = 60 * 60 * 24 * 7; | 14 const int kRequestExpirationTimeInSeconds = 60 * 60 * 24 * 7; |
15 } // namespace | 15 } // namespace |
16 | 16 |
17 namespace offline_pages { | 17 namespace offline_pages { |
18 | 18 |
19 // Policy for the Background Offlining system. Some policy will belong to the | 19 // Policy for the Background Offlining system. Some policy will belong to the |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 private: | 105 private: |
106 bool prefer_untried_requests_; | 106 bool prefer_untried_requests_; |
107 bool prefer_earlier_requests_; | 107 bool prefer_earlier_requests_; |
108 bool retry_count_is_more_important_than_recency_; | 108 bool retry_count_is_more_important_than_recency_; |
109 int max_started_tries_; | 109 int max_started_tries_; |
110 int max_completed_tries_; | 110 int max_completed_tries_; |
111 }; | 111 }; |
112 } | 112 } |
113 | 113 |
114 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_POLICY_H_ | 114 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_OFFLINER_POLICY_H_ |
OLD | NEW |