Index: chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc |
diff --git a/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc b/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc |
index 1d138ad90a24d5c4101be3e94e50a174f957f34d..73531ca38d4a9dc1ced6b2f0948b702a99f8095c 100644 |
--- a/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc |
+++ b/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc |
@@ -47,11 +47,6 @@ namespace offline_pages { |
namespace android { |
namespace { |
-const bool kPreferUntriedRequest = false; |
-const bool kPreferEarlierRequest = true; |
-const bool kPreferRetryCountOverRecency = false; |
-const int kMaxStartedTries = 4; |
-const int kMaxCompletedTries = 1; |
const int kImmediateRequestExpirationTimeInSeconds = 3600; |
void ToJavaOfflinePageList(JNIEnv* env, |
@@ -172,9 +167,13 @@ OfflinePageEvaluationBridge::GetTestingRequestCoordinator( |
content::BrowserContext* context) { |
// Create a new OfflinerPolicy with a larger background processing |
// budget (3600 sec). Other values are the same with default ones. |
+ OfflinerPolicy default_policy; |
std::unique_ptr<OfflinerPolicy> policy(new OfflinerPolicy( |
- kPreferUntriedRequest, kPreferEarlierRequest, |
- kPreferRetryCountOverRecency, kMaxStartedTries, kMaxCompletedTries, |
+ default_policy.ShouldPreferUntriedRequests(), |
+ default_policy.ShouldPreferEarlierRequests(), |
+ default_policy.RetryCountIsMoreImportantThanRecency(), |
+ default_policy.GetMaxStartedTries(), |
+ default_policy.GetMaxCompletedTries(), |
kImmediateRequestExpirationTimeInSeconds)); |
dougarnett
2016/11/16 20:16:42
I was confused by this name - consider something l
|
std::unique_ptr<OfflinerFactory> prerenderer_offliner( |
new PrerenderingOfflinerFactory(context)); |