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 #include "sync/syncable/directory_backing_store.h" | 5 #include "components/sync/syncable/directory_backing_store.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <limits> | 10 #include <limits> |
11 #include <unordered_set> | 11 #include <unordered_set> |
12 | 12 |
13 #include "base/base64.h" | 13 #include "base/base64.h" |
14 #include "base/location.h" | 14 #include "base/location.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/metrics/histogram_macros.h" | 17 #include "base/metrics/histogram_macros.h" |
18 #include "base/rand_util.h" | 18 #include "base/rand_util.h" |
19 #include "base/single_thread_task_runner.h" | 19 #include "base/single_thread_task_runner.h" |
20 #include "base/strings/stringprintf.h" | 20 #include "base/strings/stringprintf.h" |
21 #include "base/threading/thread_task_runner_handle.h" | 21 #include "base/threading/thread_task_runner_handle.h" |
22 #include "base/time/time.h" | 22 #include "base/time/time.h" |
23 #include "base/trace_event/trace_event.h" | 23 #include "base/trace_event/trace_event.h" |
24 #include "build/build_config.h" | 24 #include "build/build_config.h" |
| 25 #include "components/sync/base/node_ordinal.h" |
| 26 #include "components/sync/base/time.h" |
| 27 #include "components/sync/protocol/bookmark_specifics.pb.h" |
| 28 #include "components/sync/protocol/sync.pb.h" |
| 29 #include "components/sync/syncable/syncable-inl.h" |
| 30 #include "components/sync/syncable/syncable_columns.h" |
| 31 #include "components/sync/syncable/syncable_util.h" |
25 #include "sql/connection.h" | 32 #include "sql/connection.h" |
26 #include "sql/error_delegate_util.h" | 33 #include "sql/error_delegate_util.h" |
27 #include "sql/statement.h" | 34 #include "sql/statement.h" |
28 #include "sql/transaction.h" | 35 #include "sql/transaction.h" |
29 #include "sync/internal_api/public/base/node_ordinal.h" | |
30 #include "sync/protocol/bookmark_specifics.pb.h" | |
31 #include "sync/protocol/sync.pb.h" | |
32 #include "sync/syncable/syncable-inl.h" | |
33 #include "sync/syncable/syncable_columns.h" | |
34 #include "sync/syncable/syncable_util.h" | |
35 #include "sync/util/time.h" | |
36 | 36 |
37 using std::string; | 37 using std::string; |
38 | 38 |
39 namespace syncer { | 39 namespace syncer { |
40 namespace syncable { | 40 namespace syncable { |
41 | 41 |
42 // Increment this version whenever updating DB tables. | 42 // Increment this version whenever updating DB tables. |
43 const int32_t kCurrentDBVersion = 90; | 43 const int32_t kCurrentDBVersion = 90; |
44 | 44 |
45 // The current database page size in Kilobytes. | 45 // The current database page size in Kilobytes. |
(...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1761 DCHECK(CalledOnValidThread()); | 1761 DCHECK(CalledOnValidThread()); |
1762 DCHECK(!catastrophic_error_handler.is_null()); | 1762 DCHECK(!catastrophic_error_handler.is_null()); |
1763 catastrophic_error_handler_ = catastrophic_error_handler; | 1763 catastrophic_error_handler_ = catastrophic_error_handler; |
1764 sql::Connection::ErrorCallback error_callback = | 1764 sql::Connection::ErrorCallback error_callback = |
1765 base::Bind(&OnSqliteError, catastrophic_error_handler_); | 1765 base::Bind(&OnSqliteError, catastrophic_error_handler_); |
1766 db_->set_error_callback(error_callback); | 1766 db_->set_error_callback(error_callback); |
1767 } | 1767 } |
1768 | 1768 |
1769 } // namespace syncable | 1769 } // namespace syncable |
1770 } // namespace syncer | 1770 } // namespace syncer |
OLD | NEW |