proto_database_provider_test_base.cc 740 B

12345678910111213141516171819202122
  1. // Copyright 2019 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/optimization_guide/core/proto_database_provider_test_base.h"
  5. namespace optimization_guide {
  6. ProtoDatabaseProviderTestBase::ProtoDatabaseProviderTestBase() = default;
  7. ProtoDatabaseProviderTestBase::~ProtoDatabaseProviderTestBase() = default;
  8. void ProtoDatabaseProviderTestBase::SetUp() {
  9. ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
  10. db_provider_ = std::make_unique<leveldb_proto::ProtoDatabaseProvider>(
  11. temp_dir_.GetPath());
  12. }
  13. void ProtoDatabaseProviderTestBase::TearDown() {
  14. db_provider_.reset();
  15. }
  16. } // namespace optimization_guide