closure_task.cc 485 B

1234567891011121314151617
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "components/offline_pages/task/closure_task.h"
  5. namespace offline_pages {
  6. ClosureTask::ClosureTask(base::OnceClosure closure)
  7. : closure_(std::move(closure)) {}
  8. ClosureTask::~ClosureTask() = default;
  9. void ClosureTask::Run() {
  10. std::move(closure_).Run();
  11. TaskComplete();
  12. }
  13. } // namespace offline_pages