| 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 |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "chrome/browser/bookmarks/bookmark_node_data.h" | 12 #include "chrome/browser/bookmarks/bookmark_node_data.h" |
| 13 | 13 |
| 14 class BookmarkClient; |
| 14 class BookmarkModel; | 15 class BookmarkModel; |
| 15 class BookmarkNode; | 16 class BookmarkNode; |
| 16 class Profile; | 17 class Profile; |
| 17 | 18 |
| 18 namespace user_prefs { | 19 namespace user_prefs { |
| 19 class PrefRegistrySyncable; | 20 class PrefRegistrySyncable; |
| 20 } | 21 } |
| 21 | 22 |
| 22 // A collection of bookmark utility functions used by various parts of the UI | 23 // A collection of bookmark utility functions used by various parts of the UI |
| 23 // that show bookmarks: bookmark manager, bookmark bar view ... | 24 // that show bookmarks: bookmark manager, bookmark bar view ... |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 const BookmarkNode* GetParentForNewNodes( | 95 const BookmarkNode* GetParentForNewNodes( |
| 95 const BookmarkNode* parent, | 96 const BookmarkNode* parent, |
| 96 const std::vector<const BookmarkNode*>& selection, | 97 const std::vector<const BookmarkNode*>& selection, |
| 97 int* index); | 98 int* index); |
| 98 | 99 |
| 99 // Deletes the bookmark folders for the given list of |ids|. | 100 // Deletes the bookmark folders for the given list of |ids|. |
| 100 void DeleteBookmarkFolders(BookmarkModel* model, const std::vector<int64>& ids); | 101 void DeleteBookmarkFolders(BookmarkModel* model, const std::vector<int64>& ids); |
| 101 | 102 |
| 102 // If there are no bookmarks for url, a bookmark is created. | 103 // If there are no bookmarks for url, a bookmark is created. |
| 103 void AddIfNotBookmarked(BookmarkModel* model, | 104 void AddIfNotBookmarked(BookmarkModel* model, |
| 105 BookmarkClient* client, |
| 104 const GURL& url, | 106 const GURL& url, |
| 105 const base::string16& title); | 107 const base::string16& title); |
| 106 | 108 |
| 107 // Removes all bookmarks for the given |url|. | 109 // Removes all bookmarks for the given |url|. |
| 108 void RemoveAllBookmarks(BookmarkModel* model, const GURL& url); | 110 void RemoveAllBookmarks(BookmarkModel* model, const GURL& url); |
| 109 | 111 |
| 110 } // namespace bookmark_utils | 112 } // namespace bookmark_utils |
| 111 | 113 |
| 112 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 114 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
| OLD | NEW |