OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef COMPONENTS_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ | 5 #ifndef COMPONENTS_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ |
6 #define COMPONENTS_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ | 6 #define COMPONENTS_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/threading/non_thread_safe.h" | 15 #include "base/threading/non_thread_safe.h" |
16 #include "components/sync/base/model_type.h" | 16 #include "components/sync/base/model_type.h" |
17 #include "components/sync/syncable/dir_open_result.h" | 17 #include "components/sync/syncable/dir_open_result.h" |
18 #include "components/sync/syncable/directory.h" | 18 #include "components/sync/syncable/directory.h" |
19 #include "components/sync/syncable/metahandle_set.h" | 19 #include "components/sync/syncable/metahandle_set.h" |
20 #include "sql/connection.h" | 20 #include "sql/connection.h" |
21 #include "sql/statement.h" | 21 #include "sql/statement.h" |
22 | 22 |
23 namespace base { | 23 namespace base { |
24 namespace trace_event { | 24 namespace trace_event { |
25 class MemoryAllocatorDump; | 25 class ProcessMemoryDump; |
26 } | 26 } |
27 } | 27 } |
28 | 28 |
29 namespace sync_pb { | 29 namespace sync_pb { |
30 class EntitySpecifics; | 30 class EntitySpecifics; |
31 } | 31 } |
32 | 32 |
33 namespace syncer { | 33 namespace syncer { |
34 namespace syncable { | 34 namespace syncable { |
35 | 35 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // | 97 // |
98 // There can be at most one handler. If this method is invoked when there is | 98 // There can be at most one handler. If this method is invoked when there is |
99 // already a handler, the existing handler is overwritten with | 99 // already a handler, the existing handler is overwritten with |
100 // |catastrophic_error_handler|. | 100 // |catastrophic_error_handler|. |
101 virtual void SetCatastrophicErrorHandler( | 101 virtual void SetCatastrophicErrorHandler( |
102 const base::Closure& catastrophic_error_handler); | 102 const base::Closure& catastrophic_error_handler); |
103 | 103 |
104 // Returns true on success, false on error. | 104 // Returns true on success, false on error. |
105 bool GetDatabasePageSize(int* page_size); | 105 bool GetDatabasePageSize(int* page_size); |
106 | 106 |
107 bool ReportMemoryUsage(base::trace_event::MemoryAllocatorDump* mad); | 107 bool ReportMemoryUsage(base::trace_event::ProcessMemoryDump* pmd, |
| 108 const std::string& dump_name); |
108 | 109 |
109 protected: | 110 protected: |
110 // For test classes. | 111 // For test classes. |
111 DirectoryBackingStore(const std::string& dir_name, | 112 DirectoryBackingStore(const std::string& dir_name, |
112 sql::Connection* connection); | 113 sql::Connection* connection); |
113 | 114 |
114 // An accessor for the underlying sql::Connection. Avoid using outside of | 115 // An accessor for the underlying sql::Connection. Avoid using outside of |
115 // tests. | 116 // tests. |
116 sql::Connection* db(); | 117 sql::Connection* db(); |
117 | 118 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // sql::Connection is destroyed/recreated. | 268 // sql::Connection is destroyed/recreated. |
268 base::Closure catastrophic_error_handler_; | 269 base::Closure catastrophic_error_handler_; |
269 | 270 |
270 DISALLOW_COPY_AND_ASSIGN(DirectoryBackingStore); | 271 DISALLOW_COPY_AND_ASSIGN(DirectoryBackingStore); |
271 }; | 272 }; |
272 | 273 |
273 } // namespace syncable | 274 } // namespace syncable |
274 } // namespace syncer | 275 } // namespace syncer |
275 | 276 |
276 #endif // COMPONENTS_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ | 277 #endif // COMPONENTS_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ |
OLD | NEW |