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

Side by Side Diff: chrome/browser/sync/glue/bookmark_change_processor.h

Issue 11341048: Populate versions on individual nodes in sync model and native bookmark model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/glue/bookmark_change_processor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // will be transferred to the new node. A node corresponding to |parent| 107 // will be transferred to the new node. A node corresponding to |parent|
108 // must already exist and be associated for this call to succeed. Returns 108 // must already exist and be associated for this call to succeed. Returns
109 // the ID of the just-created node, or if creation fails, kInvalidID. 109 // the ID of the just-created node, or if creation fails, kInvalidID.
110 static int64 CreateSyncNode(const BookmarkNode* parent, 110 static int64 CreateSyncNode(const BookmarkNode* parent,
111 BookmarkModel* model, 111 BookmarkModel* model,
112 int index, 112 int index,
113 syncer::WriteTransaction* trans, 113 syncer::WriteTransaction* trans,
114 BookmarkModelAssociator* associator, 114 BookmarkModelAssociator* associator,
115 DataTypeErrorHandler* error_handler); 115 DataTypeErrorHandler* error_handler);
116 116
117 // Update transaction version of |model| and |nodes| to |new_version| if
118 // it's valid.
119 static void UpdateTransactionVersion(
120 int64 new_version,
121 BookmarkModel* model,
122 const std::vector<const BookmarkNode*>& nodes);
123
117 protected: 124 protected:
118 virtual void StartImpl(Profile* profile) OVERRIDE; 125 virtual void StartImpl(Profile* profile) OVERRIDE;
119 126
120 private: 127 private:
121 enum MoveOrCreate { 128 enum MoveOrCreate {
122 MOVE, 129 MOVE,
123 CREATE, 130 CREATE,
124 }; 131 };
125 132
126 // Helper function to determine the appropriate insertion index of sync node 133 // Helper function to determine the appropriate insertion index of sync node
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 179
173 // The two models should be associated according to this ModelAssociator. 180 // The two models should be associated according to this ModelAssociator.
174 BookmarkModelAssociator* model_associator_; 181 BookmarkModelAssociator* model_associator_;
175 182
176 DISALLOW_COPY_AND_ASSIGN(BookmarkChangeProcessor); 183 DISALLOW_COPY_AND_ASSIGN(BookmarkChangeProcessor);
177 }; 184 };
178 185
179 } // namespace browser_sync 186 } // namespace browser_sync
180 187
181 #endif // CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_ 188 #endif // CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_
OLDNEW
« 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