Commit 718f246d authored by sorin's avatar sorin Committed by Commit bot

fast-update flag only accelerates the first component update check.

BUG=630732

Review-Url: https://codereview.chromium.org/2179593003
Cr-Commit-Position: refs/heads/master@{#407664}
parent 8c141a8b
......@@ -33,8 +33,8 @@ TEST(ChromeComponentUpdaterConfiguratorTest, TestFastUpdate) {
const auto config(MakeChromeComponentUpdaterConfigurator(&cmdline, nullptr));
ASSERT_EQ(10, config->InitialDelay());
CHECK_EQ(60, config->NextCheckDelay());
CHECK_EQ(10, config->InitialDelay());
CHECK_EQ(6 * 60 * 60, config->NextCheckDelay());
CHECK_EQ(1, config->StepDelay());
CHECK_EQ(2, config->OnDemandDelay());
CHECK_EQ(10, config->UpdateDelay());
......
......@@ -33,7 +33,7 @@ const int kDelayOneHour = kDelayOneMinute * 60;
// Debug values you can pass to --component-updater=value1,value2. Do not
// use these values in production code.
// Speed up component checking.
// Speed up the initial component checking.
const char kSwitchFastUpdate[] = "fast-update";
// Add "testrequest=1" attribute to the update check request.
......@@ -126,7 +126,7 @@ int ConfiguratorImpl::InitialDelay() const {
}
int ConfiguratorImpl::NextCheckDelay() const {
return fast_update_ ? 60 : (6 * kDelayOneHour);
return 6 * kDelayOneHour;
}
int ConfiguratorImpl::StepDelay() const {
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Copyright (c) 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -44,7 +44,7 @@ TEST_F(ComponentUpdaterConfiguratorImplTest, FastUpdate) {
cmdline.AppendSwitchASCII("--component-updater", "fast-update");
config.reset(new ConfiguratorImpl(&cmdline, nullptr, false));
CHECK_EQ(10, config->InitialDelay());
CHECK_EQ(kDelayOneMinute, config->NextCheckDelay());
CHECK_EQ(6 * kDelayOneHour, config->NextCheckDelay());
CHECK_EQ(1, config->StepDelay());
CHECK_EQ(2, config->OnDemandDelay());
CHECK_EQ(10, config->UpdateDelay());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment