| 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 #ifndef SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ | 5 #ifndef SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ |
| 6 #define SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ | 6 #define SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 void GetAllMetaHandles(BaseTransaction* trans, MetahandleSet* result); | 82 void GetAllMetaHandles(BaseTransaction* trans, MetahandleSet* result); |
| 83 void CheckPurgeEntriesWithTypeInSucceeded(ModelTypeSet types_to_purge, | 83 void CheckPurgeEntriesWithTypeInSucceeded(ModelTypeSet types_to_purge, |
| 84 bool before_reload); | 84 bool before_reload); |
| 85 bool IsInDirtyMetahandles(int64 metahandle); | 85 bool IsInDirtyMetahandles(int64 metahandle); |
| 86 bool IsInMetahandlesToPurge(int64 metahandle); | 86 bool IsInMetahandlesToPurge(int64 metahandle); |
| 87 | 87 |
| 88 scoped_ptr<Directory>& dir(); | 88 scoped_ptr<Directory>& dir(); |
| 89 DirectoryChangeDelegate* directory_change_delegate(); | 89 DirectoryChangeDelegate* directory_change_delegate(); |
| 90 Encryptor* encryptor(); | 90 Encryptor* encryptor(); |
| 91 UnrecoverableErrorHandler* unrecoverable_error_handler(); | 91 TestUnrecoverableErrorHandler* unrecoverable_error_handler(); |
| 92 | 92 |
| 93 private: | 93 private: |
| 94 void ValidateEntry(BaseTransaction* trans, | 94 void ValidateEntry(BaseTransaction* trans, |
| 95 int64 id, | 95 int64 id, |
| 96 bool check_name, | 96 bool check_name, |
| 97 const std::string& name, | 97 const std::string& name, |
| 98 int64 base_version, | 98 int64 base_version, |
| 99 int64 server_version, | 99 int64 server_version, |
| 100 bool is_del); | 100 bool is_del); |
| 101 | 101 |
| 102 base::MessageLoop message_loop_; | 102 base::MessageLoop message_loop_; |
| 103 scoped_ptr<Directory> dir_; | 103 scoped_ptr<Directory> dir_; |
| 104 NullDirectoryChangeDelegate delegate_; | 104 NullDirectoryChangeDelegate delegate_; |
| 105 FakeEncryptor encryptor_; | 105 FakeEncryptor encryptor_; |
| 106 TestUnrecoverableErrorHandler handler_; | 106 TestUnrecoverableErrorHandler handler_; |
| 107 sql::Connection connection_; | 107 sql::Connection connection_; |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace syncable | 110 } // namespace syncable |
| 111 | 111 |
| 112 } // namespace syncer | 112 } // namespace syncer |
| 113 | 113 |
| 114 #endif // SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ | 114 #endif // SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ |
| OLD | NEW |