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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 const std::string& languages, | 69 const std::string& languages, |
70 std::vector<const BookmarkNode*>* nodes); | 70 std::vector<const BookmarkNode*>* nodes); |
71 | 71 |
72 // Returns true if |node|'s url or title contains the string |text|. | 72 // Returns true if |node|'s url or title contains the string |text|. |
73 // |languages| is user's accept-language setting to decode IDN. | 73 // |languages| is user's accept-language setting to decode IDN. |
74 bool DoesBookmarkContainText(const BookmarkNode* node, | 74 bool DoesBookmarkContainText(const BookmarkNode* node, |
75 const string16& text, | 75 const string16& text, |
76 const std::string& languages); | 76 const std::string& languages); |
77 | 77 |
78 // Register user preferences for Bookmarks Bar. | 78 // Register user preferences for Bookmarks Bar. |
79 void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 79 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
80 | 80 |
81 // Returns the parent for newly created folders/bookmarks. If |selection| has | 81 // Returns the parent for newly created folders/bookmarks. If |selection| has |
82 // one element and it is a folder, |selection[0]| is returned, otherwise | 82 // one element and it is a folder, |selection[0]| is returned, otherwise |
83 // |parent| is returned. If |index| is non-null it is set to the index newly | 83 // |parent| is returned. If |index| is non-null it is set to the index newly |
84 // added nodes should be added at. | 84 // added nodes should be added at. |
85 const BookmarkNode* GetParentForNewNodes( | 85 const BookmarkNode* GetParentForNewNodes( |
86 const BookmarkNode* parent, | 86 const BookmarkNode* parent, |
87 const std::vector<const BookmarkNode*>& selection, | 87 const std::vector<const BookmarkNode*>& selection, |
88 int* index); | 88 int* index); |
89 | 89 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 // Records the user opening a folder of bookmarks for UMA purposes. | 136 // Records the user opening a folder of bookmarks for UMA purposes. |
137 void RecordBookmarkFolderOpen(BookmarkLaunchLocation location); | 137 void RecordBookmarkFolderOpen(BookmarkLaunchLocation location); |
138 | 138 |
139 // Records the user opening the apps page for UMA purposes. | 139 // Records the user opening the apps page for UMA purposes. |
140 void RecordAppsPageOpen(BookmarkLaunchLocation location); | 140 void RecordAppsPageOpen(BookmarkLaunchLocation location); |
141 | 141 |
142 } // namespace bookmark_utils | 142 } // namespace bookmark_utils |
143 | 143 |
144 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 144 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
OLD | NEW |