OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/sync/syncable/syncable.h" | 5 #include "sync/syncable/syncable.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cstring> | 8 #include <cstring> |
9 #include <functional> | 9 #include <functional> |
10 #include <iomanip> | 10 #include <iomanip> |
11 #include <iterator> | 11 #include <iterator> |
12 #include <limits> | 12 #include <limits> |
13 #include <set> | 13 #include <set> |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/debug/trace_event.h" | 17 #include "base/debug/trace_event.h" |
18 #include "base/compiler_specific.h" | 18 #include "base/compiler_specific.h" |
19 #include "base/debug/trace_event.h" | 19 #include "base/debug/trace_event.h" |
20 #include "base/file_util.h" | 20 #include "base/file_util.h" |
21 #include "base/hash_tables.h" | 21 #include "base/hash_tables.h" |
22 #include "base/location.h" | 22 #include "base/location.h" |
23 #include "base/logging.h" | 23 #include "base/logging.h" |
24 #include "base/memory/scoped_ptr.h" | 24 #include "base/memory/scoped_ptr.h" |
25 #include "base/perftimer.h" | 25 #include "base/perftimer.h" |
26 #include "base/stl_util.h" | 26 #include "base/stl_util.h" |
27 #include "base/string_number_conversions.h" | 27 #include "base/string_number_conversions.h" |
28 #include "base/string_util.h" | 28 #include "base/string_util.h" |
29 #include "base/time.h" | 29 #include "base/time.h" |
30 #include "base/utf_string_conversions.h" | 30 #include "base/utf_string_conversions.h" |
31 #include "base/values.h" | 31 #include "base/values.h" |
32 #include "chrome/browser/sync/protocol/proto_value_conversions.h" | 32 #include "sync/protocol/proto_value_conversions.h" |
33 #include "chrome/browser/sync/protocol/service_constants.h" | 33 #include "sync/protocol/service_constants.h" |
34 #include "chrome/browser/sync/syncable/directory_backing_store.h" | 34 #include "sync/syncable/directory_backing_store.h" |
35 #include "chrome/browser/sync/syncable/directory_change_delegate.h" | 35 #include "sync/syncable/directory_change_delegate.h" |
36 #include "chrome/browser/sync/syncable/in_memory_directory_backing_store.h" | 36 #include "sync/syncable/in_memory_directory_backing_store.h" |
37 #include "chrome/browser/sync/syncable/model_type.h" | 37 #include "sync/syncable/model_type.h" |
38 #include "chrome/browser/sync/syncable/on_disk_directory_backing_store.h" | 38 #include "sync/syncable/on_disk_directory_backing_store.h" |
39 #include "chrome/browser/sync/syncable/syncable-inl.h" | 39 #include "sync/syncable/syncable-inl.h" |
40 #include "chrome/browser/sync/syncable/syncable_changes_version.h" | 40 #include "sync/syncable/syncable_changes_version.h" |
41 #include "chrome/browser/sync/syncable/syncable_columns.h" | 41 #include "sync/syncable/syncable_columns.h" |
42 #include "chrome/browser/sync/syncable/syncable_enum_conversions.h" | 42 #include "sync/syncable/syncable_enum_conversions.h" |
43 #include "chrome/browser/sync/syncable/transaction_observer.h" | 43 #include "sync/syncable/transaction_observer.h" |
44 #include "chrome/browser/sync/util/logging.h" | 44 #include "sync/util/logging.h" |
45 #include "chrome/browser/sync/util/cryptographer.h" | 45 #include "sync/util/cryptographer.h" |
46 #include "net/base/escape.h" | 46 #include "net/base/escape.h" |
47 | 47 |
48 namespace { | 48 namespace { |
49 | 49 |
50 enum InvariantCheckLevel { | 50 enum InvariantCheckLevel { |
51 OFF = 0, | 51 OFF = 0, |
52 VERIFY_IN_MEMORY = 1, | 52 VERIFY_IN_MEMORY = 1, |
53 FULL_DB_VERIFICATION = 2 | 53 FULL_DB_VERIFICATION = 2 |
54 }; | 54 }; |
55 | 55 |
(...skipping 2340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2396 if (entry->ref(NEXT_ID).IsRoot() || | 2396 if (entry->ref(NEXT_ID).IsRoot() || |
2397 entry->ref(NEXT_ID) != entry->ref(PREV_ID)) { | 2397 entry->ref(NEXT_ID) != entry->ref(PREV_ID)) { |
2398 return entry; | 2398 return entry; |
2399 } | 2399 } |
2400 } | 2400 } |
2401 // There were no children in the linked list. | 2401 // There were no children in the linked list. |
2402 return NULL; | 2402 return NULL; |
2403 } | 2403 } |
2404 | 2404 |
2405 } // namespace syncable | 2405 } // namespace syncable |
OLD | NEW |