blob: f13508ce7a6aab05e2b6149d918eeb31d55a4f8e [file] [log] [blame]
// Copyright 2020 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.
#include "chrome/updater/update_service_internal_impl_inactive.h"
#include "base/callback.h"
#include "base/memory/scoped_refptr.h"
#include "base/threading/sequenced_task_runner_handle.h"
#include "chrome/updater/update_service_internal.h"
namespace updater {
namespace {
class UpdateServiceInternalImplInactive : public UpdateServiceInternal {
public:
UpdateServiceInternalImplInactive() = default;
// Overrides for updater::UpdateServiceInternal.
void Run(base::OnceClosure callback) override {
base::SequencedTaskRunnerHandle::Get()->PostTask(FROM_HERE,
std::move(callback));
}
void InitializeUpdateService(base::OnceClosure callback) override {
base::SequencedTaskRunnerHandle::Get()->PostTask(FROM_HERE,
std::move(callback));
}
void Uninitialize() override {}
private:
~UpdateServiceInternalImplInactive() override = default;
};
} // namespace
scoped_refptr<UpdateServiceInternal> MakeInactiveUpdateServiceInternal() {
return base::MakeRefCounted<UpdateServiceInternalImplInactive>();
}
} // namespace updater