Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1997)

Unified Diff: sync/syncable/directory.h

Issue 1082893003: [Sync] Erase sync DB when corrupted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reduce test runtime by writing fewer bookmarks Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/sync_tests.gypi ('k') | sync/syncable/directory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/directory.h
diff --git a/sync/syncable/directory.h b/sync/syncable/directory.h
index 7f6ae0e6343414178ef7b4f452206a089ef532c6..4f45cdfe18bf0e0e53e9d1df3b2b27283833e52c 100644
--- a/sync/syncable/directory.h
+++ b/sync/syncable/directory.h
@@ -533,6 +533,7 @@ class SYNC_EXPORT Directory {
TakeSnapshotGetsOnlyDirtyHandlesTest);
FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest,
TakeSnapshotGetsMetahandlesToPurge);
+ FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, CatastrophicError);
// You'll notice that some of the methods below are private overloads of the
// public ones declared above. The general pattern is that the public overload
@@ -622,6 +623,10 @@ class SYNC_EXPORT Directory {
ModelType type,
std::vector<int64>* result);
+ // Invoked by DirectoryBackingStore when a catastrophic database error is
+ // detected.
+ void OnCatastrophicError();
+
// Returns true if the initial sync for |type| has completed.
bool InitialSyncEndedForType(BaseTransaction* trans, ModelType type);
@@ -653,6 +658,8 @@ class SYNC_EXPORT Directory {
// are deleted in native models as well.
scoped_ptr<DeleteJournal> delete_journal_;
+ base::WeakPtrFactory<Directory> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(Directory);
};
« no previous file with comments | « sync/sync_tests.gypi ('k') | sync/syncable/directory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698