diff options
author | haitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-26 20:35:35 +0000 |
---|---|---|
committer | haitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-26 20:35:35 +0000 |
commit | 839ef2d812c2596732bbf8ec90b767a7176c960e (patch) | |
tree | 23d8e3953ddcd8320dd5f9974763a00a980603c3 /sync/syncable/directory.h | |
parent | 5d3dcf83e06a7fdd9417add32a01b20540fe0cea (diff) | |
download | chromium_src-839ef2d812c2596732bbf8ec90b767a7176c960e.zip chromium_src-839ef2d812c2596732bbf8ec90b767a7176c960e.tar.gz chromium_src-839ef2d812c2596732bbf8ec90b767a7176c960e.tar.bz2 |
Special handling of preference backup to not change local values in backup mode.
This is to avoid restoring hijacked preferences due to backup in case they get
into backup DB.
BUG=387997
Review URL: https://codereview.chromium.org/354453003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/syncable/directory.h')
-rw-r--r-- | sync/syncable/directory.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sync/syncable/directory.h b/sync/syncable/directory.h index f7dd44e..2830eec 100644 --- a/sync/syncable/directory.h +++ b/sync/syncable/directory.h @@ -19,6 +19,7 @@ #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" #include "sync/internal_api/public/util/weak_handle.h" #include "sync/syncable/dir_open_result.h" +#include "sync/syncable/entry.h" #include "sync/syncable/entry_kernel.h" #include "sync/syncable/metahandle_set.h" #include "sync/syncable/parent_child_index.h" @@ -404,6 +405,11 @@ class SYNC_EXPORT Directory { const sync_pb::AttachmentIdProto& attachment_id_proto, Metahandles* result); + // Change entry to not dirty. Used in special case when we don't want to + // persist modified entry on disk. e.g. SyncBackupManager uses this to + // preserve sync preferences in DB on disk. + void UnmarkDirtyEntry(WriteTransaction* trans, Entry* entry); + protected: // for friends, mainly used by Entry constructors virtual EntryKernel* GetEntryByHandle(int64 handle); virtual EntryKernel* GetEntryByHandle(int64 metahandle, |