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

Unified Diff: chrome/browser/sync/glue/bookmark_change_processor.h

Issue 277033002: [Sync] Make BookmarkChangeProcessor resilient against updates before add (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CreateOrUpdate Created 6 years, 7 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 | « no previous file | chrome/browser/sync/glue/bookmark_change_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/bookmark_change_processor.h
diff --git a/chrome/browser/sync/glue/bookmark_change_processor.h b/chrome/browser/sync/glue/bookmark_change_processor.h
index cd86131f568f65bdb6b3a98c1633060088bb9dc4..dbb67f7e9ca6bbc803e4f06ffef08bc9815d2e4c 100644
--- a/chrome/browser/sync/glue/bookmark_change_processor.h
+++ b/chrome/browser/sync/glue/bookmark_change_processor.h
@@ -133,6 +133,13 @@ class BookmarkChangeProcessor : public BookmarkModelObserver,
BookmarkModelAssociator* associator,
DataTypeErrorHandler* error_handler);
+ // Update |bookmark_node|'s sync node.
+ static int64 UpdateSyncNode(const BookmarkNode* bookmark_node,
+ BookmarkModel* model,
+ syncer::WriteTransaction* trans,
+ BookmarkModelAssociator* associator,
+ DataTypeErrorHandler* error_handler);
+
// Update transaction version of |model| and |nodes| to |new_version| if
// it's valid.
static void UpdateTransactionVersion(
@@ -196,6 +203,9 @@ class BookmarkChangeProcessor : public BookmarkModelObserver,
// Remove all the sync nodes associated with |node| and its children.
void RemoveSyncNodeHierarchy(const BookmarkNode* node);
+ // Creates or updates a sync node associated with |node|.
+ void CreateOrUpdateSyncNode(const BookmarkNode* node);
+
// The bookmark model we are processing changes from. Non-NULL when
// |running_| is true.
BookmarkModel* bookmark_model_;
« no previous file with comments | « no previous file | chrome/browser/sync/glue/bookmark_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698