OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // at |index|. If |index| is -1 the nodes are added to the end. | 108 // at |index|. If |index| is -1 the nodes are added to the end. |
109 void PasteFromClipboard(BookmarkModel* model, | 109 void PasteFromClipboard(BookmarkModel* model, |
110 const BookmarkNode* parent, | 110 const BookmarkNode* parent, |
111 int index); | 111 int index); |
112 | 112 |
113 // Returns true if the user can copy from the pasteboard. | 113 // Returns true if the user can copy from the pasteboard. |
114 bool CanPasteFromClipboard(const BookmarkNode* node); | 114 bool CanPasteFromClipboard(const BookmarkNode* node); |
115 | 115 |
116 // Returns a name for the given URL. Used for drags into bookmark areas when | 116 // Returns a name for the given URL. Used for drags into bookmark areas when |
117 // the source doesn't specify a title. | 117 // the source doesn't specify a title. |
118 std::string GetNameForURL(const GURL& url); | 118 string16 GetNameForURL(const GURL& url); |
119 | 119 |
120 // Returns a vector containing up to |max_count| of the most recently modified | 120 // Returns a vector containing up to |max_count| of the most recently modified |
121 // groups. This never returns an empty vector. | 121 // groups. This never returns an empty vector. |
122 std::vector<const BookmarkNode*> GetMostRecentlyModifiedGroups( | 122 std::vector<const BookmarkNode*> GetMostRecentlyModifiedGroups( |
123 BookmarkModel* model, size_t max_count); | 123 BookmarkModel* model, size_t max_count); |
124 | 124 |
125 // Returns the most recently added bookmarks. This does not return groups, | 125 // Returns the most recently added bookmarks. This does not return groups, |
126 // only nodes of type url. | 126 // only nodes of type url. |
127 void GetMostRecentlyAddedEntries(BookmarkModel* model, | 127 void GetMostRecentlyAddedEntries(BookmarkModel* model, |
128 size_t count, | 128 size_t count, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 // Number of bookmarks we'll open before prompting the user to see if they | 210 // Number of bookmarks we'll open before prompting the user to see if they |
211 // really want to open all. | 211 // really want to open all. |
212 // | 212 // |
213 // NOTE: treat this as a const. It is not const as various tests change the | 213 // NOTE: treat this as a const. It is not const as various tests change the |
214 // value. | 214 // value. |
215 extern int num_urls_before_prompting; | 215 extern int num_urls_before_prompting; |
216 | 216 |
217 } // namespace bookmark_utils | 217 } // namespace bookmark_utils |
218 | 218 |
219 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 219 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
OLD | NEW |