Skip to content

Commit

Permalink
[Offline Pages] Fix test harness not using default policy.
Browse files Browse the repository at this point in the history
Fixed the issue where the test harness was not using the values in default
policy, which would not be easy to track and lead to unexpected results.

BUG=665990

Review-Url: https://codereview.chromium.org/2506103002
Cr-Commit-Position: refs/heads/master@{#433312}
  • Loading branch information
romax authored and Commit bot committed Nov 18, 2016
1 parent 4f5114e commit 602bcba
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +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,
jobject j_result_obj,
Expand Down Expand Up @@ -170,12 +164,7 @@ bool OfflinePageEvaluationBridge::Register(JNIEnv* env) {
std::unique_ptr<KeyedService>
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.
std::unique_ptr<OfflinerPolicy> policy(new OfflinerPolicy(
kPreferUntriedRequest, kPreferEarlierRequest,
kPreferRetryCountOverRecency, kMaxStartedTries, kMaxCompletedTries,
kImmediateRequestExpirationTimeInSeconds));
std::unique_ptr<OfflinerPolicy> policy(new OfflinerPolicy());
std::unique_ptr<OfflinerFactory> prerenderer_offliner(
new PrerenderingOfflinerFactory(context));

Expand Down

0 comments on commit 602bcba

Please sign in to comment.