Chromium Code Reviews| Index: sync/test/directory_backing_store_corruption_testing.h |
| diff --git a/sync/test/directory_backing_store_corruption_testing.h b/sync/test/directory_backing_store_corruption_testing.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5897ec0466d28d072ffdbb774e7120a010af3155 |
| --- /dev/null |
| +++ b/sync/test/directory_backing_store_corruption_testing.h |
| @@ -0,0 +1,27 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef SYNC_TEST_DIRECTORY_BACKING_STORE_CORRUPTION_TESTING_H_ |
| +#define SYNC_TEST_DIRECTORY_BACKING_STORE_CORRUPTION_TESTING_H_ |
| + |
| +#include "base/files/file_path.h" |
| + |
| +namespace syncer { |
| +namespace syncable { |
| +namespace corruption_testing { |
| + |
| +// The number of DB entries required to reliably trigger detectable corruption |
| +// using |CorruptDatabase|. |
| +extern const int kNumEntriesRequiredForCorruption; |
|
Nicolas Zea
2015/04/27 19:17:32
any reason you don't just define the constant here
maniscalco
2015/04/27 19:51:17
If the value were defined in the header file, then
|
| + |
| +// Corrupt the sync database at |backing_file_path|. |
| +// |
| +// Returns true if the database was successfully corrupted. |
| +bool CorruptDatabase(const base::FilePath& backing_file_path); |
| + |
| +} // namespace corruption_util |
| +} // namespace syncable |
| +} // namespace syncer |
| + |
| +#endif // SYNC_TEST_DIRECTORY_BACKING_STORE_CORRUPTION_TESTING_H_ |