1 // Copyright 2020 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 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_COMPACTION_TASK_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_COMPACTION_TASK_H_ 7 8 #include "content/browser/indexed_db/indexed_db_pre_close_task_queue.h" 9 10 namespace leveldb { 11 class DB; 12 } // namespace leveldb 13 14 namespace content { 15 16 class IndexedDBCompactionTask 17 : public IndexedDBPreCloseTaskQueue::PreCloseTask { 18 public: 19 explicit IndexedDBCompactionTask(leveldb::DB* database); 20 ~IndexedDBCompactionTask() override; 21 22 bool RequiresMetadata() const override; 23 24 void Stop(IndexedDBPreCloseTaskQueue::StopReason reason) override; 25 26 bool RunRound() override; 27 }; 28 29 } // namespace content 30 31 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_COMPACTION_TASK_H_ 32