| 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 // Utilities that are useful in verifying the state of items in a | 5 // Utilities that are useful in verifying the state of items in a |
| 6 // syncable database. | 6 // syncable database. |
| 7 | 7 |
| 8 #ifndef SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_ | 8 #ifndef SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_ |
| 9 #define SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_ | 9 #define SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_ |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "sync/internal_api/public/base/model_type.h" | 13 #include "sync/internal_api/public/base/model_type.h" |
| 14 #include "sync/protocol/sync.pb.h" |
| 14 | 15 |
| 15 namespace syncer { | 16 namespace syncer { |
| 16 namespace syncable { | 17 namespace syncable { |
| 17 | 18 |
| 18 class BaseTransaction; | 19 class BaseTransaction; |
| 19 class Directory; | 20 class Directory; |
| 20 class Id; | 21 class Id; |
| 21 class WriteTransaction; | 22 class WriteTransaction; |
| 22 | 23 |
| 23 // Count the number of entries with a given name inside of a parent. | 24 // Count the number of entries with a given name inside of a parent. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 35 // Assert that there's only one entry by this name in this parent. | 36 // Assert that there's only one entry by this name in this parent. |
| 36 // Return the Id. | 37 // Return the Id. |
| 37 Id GetOnlyEntryWithName(BaseTransaction* rtrans, | 38 Id GetOnlyEntryWithName(BaseTransaction* rtrans, |
| 38 const syncable::Id& parent_id, | 39 const syncable::Id& parent_id, |
| 39 const std::string& name); | 40 const std::string& name); |
| 40 | 41 |
| 41 void CreateTypeRoot(WriteTransaction* trans, | 42 void CreateTypeRoot(WriteTransaction* trans, |
| 42 syncable::Directory *dir, | 43 syncable::Directory *dir, |
| 43 ModelType type); | 44 ModelType type); |
| 44 | 45 |
| 46 sync_pb::DataTypeProgressMarker BuildProgress(ModelType type); |
| 47 |
| 45 } // namespace syncable | 48 } // namespace syncable |
| 46 } // namespace syncer | 49 } // namespace syncer |
| 47 | 50 |
| 48 #endif // SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_ | 51 #endif // SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_ |
| OLD | NEW |