OLD | NEW |
---|---|
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_MODEL_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ |
6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ | 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 | 160 |
161 // Sets the URL of |node|. | 161 // Sets the URL of |node|. |
162 void SetURL(const BookmarkNode* node, const GURL& url); | 162 void SetURL(const BookmarkNode* node, const GURL& url); |
163 | 163 |
164 // Sets the date added time of |node|. | 164 // Sets the date added time of |node|. |
165 void SetDateAdded(const BookmarkNode* node, base::Time date_added); | 165 void SetDateAdded(const BookmarkNode* node, base::Time date_added); |
166 | 166 |
167 // Returns the set of nodes with the |url|. | 167 // Returns the set of nodes with the |url|. |
168 void GetNodesByURL(const GURL& url, std::vector<const BookmarkNode*>* nodes); | 168 void GetNodesByURL(const GURL& url, std::vector<const BookmarkNode*>* nodes); |
169 | 169 |
170 // Return the set of nodes and titles with the |url| and |title|. | |
171 void GetNodesByURLAndTitle(const GURL& url, | |
172 const base::string16 title, | |
tfarina
2014/08/13 13:40:52
const base::string16&
Deepak
2014/08/14 02:54:50
Done.
| |
173 const BookmarkNode* parent, | |
174 std::vector<const BookmarkNode*>* nodes, | |
175 std::vector<base::string16>* titles); | |
tfarina
2014/08/13 13:40:52
why you here titles here?
Deepak
2014/08/14 02:54:50
As I am making a vector that have titles of the n
| |
176 | |
170 // Returns the most recently added user node for the |url|; urls from any | 177 // Returns the most recently added user node for the |url|; urls from any |
171 // nodes that are not editable by the user are never returned by this call. | 178 // nodes that are not editable by the user are never returned by this call. |
172 // Returns NULL if |url| is not bookmarked. | 179 // Returns NULL if |url| is not bookmarked. |
173 const BookmarkNode* GetMostRecentlyAddedUserNodeForURL(const GURL& url); | 180 const BookmarkNode* GetMostRecentlyAddedUserNodeForURL(const GURL& url); |
174 | 181 |
175 // Returns true if there are bookmarks, otherwise returns false. | 182 // Returns true if there are bookmarks, otherwise returns false. |
176 // This method is thread safe. | 183 // This method is thread safe. |
177 bool HasBookmarks(); | 184 bool HasBookmarks(); |
178 | 185 |
179 // Returns true if the specified URL is bookmarked. | 186 // Returns true if the specified URL is bookmarked. |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
423 | 430 |
424 // See description of IsDoingExtensiveChanges above. | 431 // See description of IsDoingExtensiveChanges above. |
425 int extensive_changes_; | 432 int extensive_changes_; |
426 | 433 |
427 scoped_ptr<bookmarks::BookmarkExpandedStateTracker> expanded_state_tracker_; | 434 scoped_ptr<bookmarks::BookmarkExpandedStateTracker> expanded_state_tracker_; |
428 | 435 |
429 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); | 436 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); |
430 }; | 437 }; |
431 | 438 |
432 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ | 439 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ |
OLD | NEW |