OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/leveldb_proto/proto_database_impl.h" | 5 #include "components/leveldb_proto/proto_database_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
15 #include "base/files/scoped_temp_dir.h" | 15 #include "base/files/scoped_temp_dir.h" |
16 #include "base/location.h" | 16 #include "base/location.h" |
17 #include "base/memory/ptr_util.h" | 17 #include "base/memory/ptr_util.h" |
| 18 #include "base/message_loop/message_loop.h" |
18 #include "base/run_loop.h" | 19 #include "base/run_loop.h" |
19 #include "base/threading/thread.h" | 20 #include "base/threading/thread.h" |
20 #include "base/trace_event/memory_dump_manager.h" | 21 #include "base/trace_event/memory_dump_manager.h" |
21 #include "base/trace_event/process_memory_dump.h" | 22 #include "base/trace_event/process_memory_dump.h" |
22 #include "components/leveldb_proto/leveldb_database.h" | 23 #include "components/leveldb_proto/leveldb_database.h" |
23 #include "components/leveldb_proto/testing/proto/test.pb.h" | 24 #include "components/leveldb_proto/testing/proto/test.pb.h" |
24 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
26 #include "third_party/leveldatabase/src/include/leveldb/options.h" | 27 #include "third_party/leveldatabase/src/include/leveldb/options.h" |
27 | 28 |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 ->system_allocator_pool_name(); | 653 ->system_allocator_pool_name(); |
653 size_t expected_dump_count = system_allocator_pool_name ? 2 : 1; | 654 size_t expected_dump_count = system_allocator_pool_name ? 2 : 1; |
654 EXPECT_EQ(expected_dump_count, allocator_dumps.size()); | 655 EXPECT_EQ(expected_dump_count, allocator_dumps.size()); |
655 for (const auto& dump : allocator_dumps) { | 656 for (const auto& dump : allocator_dumps) { |
656 ASSERT_TRUE(dump.first.find("leveldb/leveldb_proto/") == 0 || | 657 ASSERT_TRUE(dump.first.find("leveldb/leveldb_proto/") == 0 || |
657 dump.first.find(system_allocator_pool_name) == 0); | 658 dump.first.find(system_allocator_pool_name) == 0); |
658 } | 659 } |
659 } | 660 } |
660 | 661 |
661 } // namespace leveldb_proto | 662 } // namespace leveldb_proto |
OLD | NEW |