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

Side by Side Diff: components/bookmarks/browser/bookmark_utils.h

Issue 1906973002: Convert //components/bookmarks from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_
6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 class BookmarkClient; 30 class BookmarkClient;
31 class BookmarkModel; 31 class BookmarkModel;
32 class BookmarkNode; 32 class BookmarkNode;
33 33
34 // Fields to use when finding matching bookmarks. 34 // Fields to use when finding matching bookmarks.
35 struct QueryFields { 35 struct QueryFields {
36 QueryFields(); 36 QueryFields();
37 ~QueryFields(); 37 ~QueryFields();
38 38
39 scoped_ptr<base::string16> word_phrase_query; 39 std::unique_ptr<base::string16> word_phrase_query;
40 scoped_ptr<base::string16> url; 40 std::unique_ptr<base::string16> url;
41 scoped_ptr<base::string16> title; 41 std::unique_ptr<base::string16> title;
42 }; 42 };
43 43
44 // Clones bookmark node, adding newly created nodes to |parent| starting at 44 // Clones bookmark node, adding newly created nodes to |parent| starting at
45 // |index_to_add_at|. If |reset_node_times| is true cloned bookmarks and 45 // |index_to_add_at|. If |reset_node_times| is true cloned bookmarks and
46 // folders will receive new creation times and folder modification times 46 // folders will receive new creation times and folder modification times
47 // instead of using the values stored in |elements|. 47 // instead of using the values stored in |elements|.
48 void CloneBookmarkNode(BookmarkModel* model, 48 void CloneBookmarkNode(BookmarkModel* model,
49 const std::vector<BookmarkNodeData::Element>& elements, 49 const std::vector<BookmarkNodeData::Element>& elements,
50 const BookmarkNode* parent, 50 const BookmarkNode* parent,
51 int index_to_add_at, 51 int index_to_add_at,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // Returns true if |node| is a descendant of |root|. 158 // Returns true if |node| is a descendant of |root|.
159 bool IsDescendantOf(const BookmarkNode* node, const BookmarkNode* root); 159 bool IsDescendantOf(const BookmarkNode* node, const BookmarkNode* root);
160 160
161 // Returns true if any node in |list| is a descendant of |root|. 161 // Returns true if any node in |list| is a descendant of |root|.
162 bool HasDescendantsOf(const std::vector<const BookmarkNode*>& list, 162 bool HasDescendantsOf(const std::vector<const BookmarkNode*>& list,
163 const BookmarkNode* root); 163 const BookmarkNode* root);
164 164
165 } // namespace bookmarks 165 } // namespace bookmarks
166 166
167 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ 167 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_
OLDNEW
« no previous file with comments | « components/bookmarks/browser/bookmark_undo_provider.h ('k') | components/bookmarks/browser/bookmark_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698