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

Unified Diff: sync/internal_api/public/delete_journal.h

Issue 11533008: Use delete journal to remove bookmarks that are already deleted in sync model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/internal_api/delete_journal.cc ('k') | sync/internal_api/public/test/test_user_share.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/delete_journal.h
diff --git a/sync/internal_api/public/delete_journal.h b/sync/internal_api/public/delete_journal.h
new file mode 100644
index 0000000000000000000000000000000000000000..1e66b3c30b559bd4e278faadd83b69ed524bfd90
--- /dev/null
+++ b/sync/internal_api/public/delete_journal.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2012 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_INTERNAL_API_PUBLIC_DELETE_JOURNAL_H_
+#define SYNC_INTERNAL_API_PUBLIC_DELETE_JOURNAL_H_
+
+#include <vector>
+
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/protocol/sync.pb.h"
+
+namespace syncer {
+
+class BaseTransaction;
+
+struct BookmarkDeleteJournal {
+ int64 id; // Metahandle of delete journal entry.
+ bool is_folder;
+ sync_pb::EntitySpecifics specifics;
+};
+typedef std::vector<BookmarkDeleteJournal> BookmarkDeleteJournalList;
+
+// Static APIs for passing delete journals between syncer::syncable namspace
+// and syncer namespace.
+class DeleteJournal {
+ public:
+ // Return info about deleted bookmark entries stored in the delete journal
+ // of |trans|'s directory.
+ // TODO(haitaol): remove this after SyncData supports bookmarks and
+ // all types of delete journals can be returned as
+ // SyncDataList.
+ static void GetBookmarkDeleteJournals(
+ BaseTransaction* trans, BookmarkDeleteJournalList *delete_journals);
+
+ // Purge delete journals of given IDs from |trans|'s directory.
+ static void PurgeDeleteJournals(BaseTransaction* trans,
+ const std::set<int64>& ids);
+};
+
+} // namespace syncer
+
+#endif // SYNC_INTERNAL_API_PUBLIC_DELETE_JOURNAL_H_
« no previous file with comments | « sync/internal_api/delete_journal.cc ('k') | sync/internal_api/public/test/test_user_share.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698