| OLD | NEW |
| 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_BOOKMARKS_BOOKMARK_UTILS_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
| 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // only nodes of type url. | 58 // only nodes of type url. |
| 59 void GetMostRecentlyAddedEntries(BookmarkModel* model, | 59 void GetMostRecentlyAddedEntries(BookmarkModel* model, |
| 60 size_t count, | 60 size_t count, |
| 61 std::vector<const BookmarkNode*>* nodes); | 61 std::vector<const BookmarkNode*>* nodes); |
| 62 | 62 |
| 63 // Returns true if |n1| was added more recently than |n2|. | 63 // Returns true if |n1| was added more recently than |n2|. |
| 64 bool MoreRecentlyAdded(const BookmarkNode* n1, const BookmarkNode* n2); | 64 bool MoreRecentlyAdded(const BookmarkNode* n1, const BookmarkNode* n2); |
| 65 | 65 |
| 66 // Returns up to |max_count| bookmarks from |model| whose url or title contains | 66 // Returns up to |max_count| bookmarks from |model| whose url or title contains |
| 67 // the text |text|. |languages| is user's accept-language setting to decode | 67 // the text |text|. |languages| is user's accept-language setting to decode |
| 68 // IDN. | 68 // IDN. Permanent nodes are not included in search results. |
| 69 void GetBookmarksContainingText(BookmarkModel* model, | 69 void GetBookmarksContainingText(BookmarkModel* model, |
| 70 const base::string16& text, | 70 const base::string16& text, |
| 71 size_t max_count, | 71 size_t max_count, |
| 72 const std::string& languages, | 72 const std::string& languages, |
| 73 std::vector<const BookmarkNode*>* nodes); | 73 std::vector<const BookmarkNode*>* nodes); |
| 74 | 74 |
| 75 // Register user preferences for Bookmarks Bar. | 75 // Register user preferences for Bookmarks Bar. |
| 76 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 76 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 77 | 77 |
| 78 // Returns the parent for newly created folders/bookmarks. If |selection| has | 78 // Returns the parent for newly created folders/bookmarks. If |selection| has |
| (...skipping 12 matching lines...) Expand all Loading... |
| 91 void AddIfNotBookmarked(BookmarkModel* model, | 91 void AddIfNotBookmarked(BookmarkModel* model, |
| 92 const GURL& url, | 92 const GURL& url, |
| 93 const base::string16& title); | 93 const base::string16& title); |
| 94 | 94 |
| 95 // Removes all bookmarks for the given |url|. | 95 // Removes all bookmarks for the given |url|. |
| 96 void RemoveAllBookmarks(BookmarkModel* model, const GURL& url); | 96 void RemoveAllBookmarks(BookmarkModel* model, const GURL& url); |
| 97 | 97 |
| 98 } // namespace bookmark_utils | 98 } // namespace bookmark_utils |
| 99 | 99 |
| 100 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 100 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
| OLD | NEW |