| # Copyright 2014 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. |
| |
| import("//third_party/protobuf/proto_library.gni") |
| |
| proto_library("proto") { |
| sources = [ |
| "proto/shared_db_metadata.proto", |
| ] |
| } |
| |
| static_library("leveldb_proto") { |
| sources = [ |
| "leveldb_database.cc", |
| "leveldb_database.h", |
| "migration_delegate.h", |
| "proto_database.cc", |
| "proto_database.h", |
| "proto_database_impl.h", |
| "proto_database_provider.cc", |
| "proto_database_provider.h", |
| "proto_database_wrapper.cc", |
| "proto_database_wrapper.h", |
| "proto_leveldb_wrapper.cc", |
| "proto_leveldb_wrapper.h", |
| "proto_leveldb_wrapper_metrics.cc", |
| "proto_leveldb_wrapper_metrics.h", |
| "shared_proto_database.cc", |
| "shared_proto_database.h", |
| "shared_proto_database_client.cc", |
| "shared_proto_database_client.h", |
| "shared_proto_database_client_list.cc", |
| "shared_proto_database_client_list.h", |
| "shared_proto_database_provider.cc", |
| "shared_proto_database_provider.h", |
| "unique_proto_database.h", |
| ] |
| deps = [ |
| ":proto", |
| ] |
| |
| public_deps = [ |
| "//base", |
| "//components/keyed_service/core", |
| "//third_party/leveldatabase", |
| ] |
| } |
| |
| source_set("test_support") { |
| testonly = true |
| sources = [ |
| "testing/fake_db.h", |
| ] |
| |
| public_deps = [ |
| ":leveldb_proto", |
| "//base", |
| "//base/test:test_support", |
| "//components/leveldb_proto/testing/proto", |
| ] |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ |
| "proto_database_wrapper_unittest.cc", |
| "shared_proto_database_client_unittest.cc", |
| "shared_proto_database_unittest.cc", |
| "unique_proto_database_unittest.cc", |
| ] |
| deps = [ |
| ":test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| } |