Index: sync/syncable/on_disk_directory_backing_store.h |
diff --git a/sync/syncable/on_disk_directory_backing_store.h b/sync/syncable/on_disk_directory_backing_store.h |
index f722ef95877b03cb5ae0242391d247c42307bd26..0bf720bf540a2eb85d05189734c74d828ff457f9 100644 |
--- a/sync/syncable/on_disk_directory_backing_store.h |
+++ b/sync/syncable/on_disk_directory_backing_store.h |
@@ -17,11 +17,25 @@ class OnDiskDirectoryBackingStore : public DirectoryBackingStore { |
public: |
OnDiskDirectoryBackingStore(const std::string& dir_name, |
const FilePath& backing_filepath); |
+ virtual ~OnDiskDirectoryBackingStore(); |
virtual DirOpenResult Load( |
MetahandlesIndex* entry_bucket, |
Directory::KernelLoadInfo* kernel_load_info) OVERRIDE; |
+ // A helper function that will make one attempt to load the directory. |
+ // Unlike Load(), it does not attempt to recover from failure. |
+ DirOpenResult TryLoad( |
+ MetahandlesIndex* entry_bucket, |
+ Directory::KernelLoadInfo* kernel_load_info); |
+ |
+ protected: |
+ // Subclasses may override this to avoid a possible DCHECK. |
+ virtual void ReportFirstTryOpenFailure(); |
+ |
private: |
+ FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MinorCorruption); |
+ |
+ bool allow_failure_for_test_; |
FilePath backing_filepath_; |
}; |