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

Side by Side Diff: components/sync_bookmarks/bookmark_change_processor.h

Issue 1921923002: Convert //components/[o-t]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 unified diff | Download patch
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 COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_CHANGE_PROCESSOR_H_ 5 #ifndef COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_CHANGE_PROCESSOR_H_
6 #define COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_CHANGE_PROCESSOR_H_ 6 #define COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_CHANGE_PROCESSOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 protected: 180 protected:
181 void StartImpl() override; 181 void StartImpl() override;
182 182
183 private: 183 private:
184 enum MoveOrCreate { 184 enum MoveOrCreate {
185 MOVE, 185 MOVE,
186 CREATE, 186 CREATE,
187 }; 187 };
188 188
189 // Retrieves the meta info from the given sync node. 189 // Retrieves the meta info from the given sync node.
190 static scoped_ptr<bookmarks::BookmarkNode::MetaInfoMap> GetBookmarkMetaInfo( 190 static std::unique_ptr<bookmarks::BookmarkNode::MetaInfoMap>
191 const syncer::BaseNode* sync_node); 191 GetBookmarkMetaInfo(const syncer::BaseNode* sync_node);
192 192
193 // Sets the meta info of the given sync node from the given bookmark node. 193 // Sets the meta info of the given sync node from the given bookmark node.
194 static void SetSyncNodeMetaInfo(const bookmarks::BookmarkNode* node, 194 static void SetSyncNodeMetaInfo(const bookmarks::BookmarkNode* node,
195 syncer::WriteNode* sync_node); 195 syncer::WriteNode* sync_node);
196 196
197 // Helper function used to fix the position of a sync node so that it matches 197 // Helper function used to fix the position of a sync node so that it matches
198 // the position of a corresponding bookmark model node. |parent| and 198 // the position of a corresponding bookmark model node. |parent| and
199 // |index| identify the bookmark model position. |dst| is the node whose 199 // |index| identify the bookmark model position. |dst| is the node whose
200 // position is to be fixed. If |operation| is CREATE, treat |dst| as an 200 // position is to be fixed. If |operation| is CREATE, treat |dst| as an
201 // uncreated node and set its position via InitByCreation(); otherwise, 201 // uncreated node and set its position via InitByCreation(); otherwise,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 // The two models should be associated according to this ModelAssociator. 254 // The two models should be associated according to this ModelAssociator.
255 BookmarkModelAssociator* model_associator_; 255 BookmarkModelAssociator* model_associator_;
256 256
257 DISALLOW_COPY_AND_ASSIGN(BookmarkChangeProcessor); 257 DISALLOW_COPY_AND_ASSIGN(BookmarkChangeProcessor);
258 }; 258 };
259 259
260 } // namespace browser_sync 260 } // namespace browser_sync
261 261
262 #endif // COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_CHANGE_PROCESSOR_H_ 262 #endif // COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_CHANGE_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698