Commit 8fca7c92 authored by lazyboy's avatar lazyboy Committed by Commit bot

Remove not needed ExtensionUpdater::default_params_ and its setter.

I was going to rename set_default_check_params() to
set_default_check_params_for_testing(), but then realized we don't
need this at all.
Then asargent@ pointed out that we don't even need the member
default_params_ in ExtensionUpdater.

One use of this was to specify check_blacklist (http://crrev.com/11339047),
however, later this was removed (http://crrev.com/23591050), but the
code stayed around.

Cleaning this up to remove confusion.

BUG=None
Test=unit_tests and browser_tests compiles under ChromeOS.

Review URL: https://codereview.chromium.org/1630903003

Cr-Commit-Position: refs/heads/master@{#371524}
parent 62176a0b
......@@ -624,8 +624,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest,
browser()->profile())->extension_service();
ExtensionRegistry* registry = ExtensionRegistry::Get(browser()->profile());
const char kExtensionId[] = "ogjcoiohnmldgjemafoockdghcjciccf";
extensions::ExtensionUpdater::CheckParams params;
service->updater()->set_default_check_params(params);
const size_t size_before = registry->enabled_extensions().size();
base::FilePath basedir = test_data_dir_.AppendASCII("autoupdate");
ASSERT_TRUE(registry->disabled_extensions().is_empty());
......
......@@ -213,9 +213,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest,
GURL("http://localhost/autoupdate/v2.crx"),
scoped_temp_dir_.path().AppendASCII("permissions2.crx"));
extensions::ExtensionUpdater::CheckParams params;
service_->updater()->set_default_check_params(params);
extensions::TestExtensionRegistryObserver install_observer(registry_);
sync_service->ProcessSyncChanges(
FROM_HERE,
......@@ -252,9 +249,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest, RemoteInstall) {
GURL("http://localhost/autoupdate/v2.crx"),
scoped_temp_dir_.path().AppendASCII("permissions2.crx"));
extensions::ExtensionUpdater::CheckParams params;
service_->updater()->set_default_check_params(params);
sync_pb::EntitySpecifics specifics;
specifics.mutable_extension()->set_id(extension_id);
specifics.mutable_extension()->set_enabled(false);
......
......@@ -269,7 +269,7 @@ void ExtensionUpdater::ScheduleNextCheck(const TimeDelta& target_delay) {
void ExtensionUpdater::TimerFired() {
DCHECK(alive_);
CheckNow(default_params_);
CheckNow(CheckParams());
// If the user has overridden the update frequency, don't bother reporting
// this.
......@@ -321,7 +321,7 @@ void ExtensionUpdater::StopTimerForTesting() {
void ExtensionUpdater::DoCheckSoon() {
DCHECK(will_check_soon_);
CheckNow(default_params_);
CheckNow(CheckParams());
will_check_soon_ = false;
}
......
......@@ -119,12 +119,6 @@ class ExtensionUpdater : public ExtensionDownloaderDelegate,
// code should just call CheckSoon().
bool WillCheckSoon() const;
// Changes the params that are used for the automatic periodic update checks,
// as well as for explicit calls to CheckSoon.
void set_default_check_params(const CheckParams& params) {
default_params_ = params;
}
// Overrides the extension cache with |extension_cache| for testing.
void SetExtensionCacheForTesting(ExtensionCache* extension_cache);
......@@ -271,8 +265,6 @@ class ExtensionUpdater : public ExtensionDownloaderDelegate,
std::stack<FetchedCRXFile> fetched_crx_files_;
FetchedCRXFile current_crx_file_;
CheckParams default_params_;
ExtensionCache* extension_cache_;
// Keeps track of when an extension tried to update itself, so we can throttle
......
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