1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
content / browser / indexed_db / instance / leveldb_compaction_task.cc [blame]
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/indexed_db/instance/leveldb_compaction_task.h"
#include "base/trace_event/base_tracing.h"
#include "third_party/leveldatabase/src/include/leveldb/db.h"
namespace content::indexed_db {
IndexedDBCompactionTask::IndexedDBCompactionTask(leveldb::DB* database)
: BackingStorePreCloseTaskQueue::PreCloseTask(database) {}
IndexedDBCompactionTask::~IndexedDBCompactionTask() = default;
bool IndexedDBCompactionTask::RequiresMetadata() const {
return false;
}
bool IndexedDBCompactionTask::RunRound() {
TRACE_EVENT0("IndexedDB", "CompactRange");
database()->CompactRange(nullptr, nullptr);
return true;
}
} // namespace content::indexed_db