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

Unified Diff: chrome/browser/sync/syncable/syncable.h

Issue 8366030: Introduce the plumbing necessary to report Unrecoverable error from model safe workers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For a high level review. Created 9 years, 2 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
Index: chrome/browser/sync/syncable/syncable.h
diff --git a/chrome/browser/sync/syncable/syncable.h b/chrome/browser/sync/syncable/syncable.h
index 4f8875f92ddac46987a8a898a70f446fbde1fc8c..25b23590401c60cbdc4ec85e1d2f3ec857027bb3 100644
--- a/chrome/browser/sync/syncable/syncable.h
+++ b/chrome/browser/sync/syncable/syncable.h
@@ -53,7 +53,6 @@ namespace syncable {
class DirectoryChangeDelegate;
class TransactionObserver;
class Entry;
-
std::ostream& operator<<(std::ostream& s, const Entry& e);
class DirectoryBackingStore;
@@ -874,6 +873,9 @@ class Directory {
void AddTransactionObserver(TransactionObserver* observer);
void RemoveTransactionObserver(TransactionObserver* observer);
+ void set_unrecoverable_error();
+ bool unrecoverable_error() const;
+
protected: // for friends, mainly used by Entry constructors
virtual EntryKernel* GetEntryByHandle(int64 handle);
virtual EntryKernel* GetEntryByHandle(int64 metahandle,
@@ -1152,6 +1154,11 @@ class Directory {
Kernel* kernel_;
DirectoryBackingStore* store_;
+
+ // Keep a copy to check before performing some shutdown operations.
+ // Otherwise if the store is corrupted and we perform those operations
+ // anyway(as part of sync shutdown) then we will crash there.
+ bool unrecoverable_error_;
};
class ScopedKernelLock {
@@ -1171,6 +1178,8 @@ class BaseTransaction {
inline Directory* directory() const { return directory_; }
inline Id root_id() const { return Id(); }
+ void set_unrecoverable_error();
+
virtual ~BaseTransaction();
protected:

Powered by Google App Engine
This is Rietveld 408576698