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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 class BookmarkModelObserver; | 26 class BookmarkModelObserver; |
27 class PrefService; | 27 class PrefService; |
28 | 28 |
29 namespace base { | 29 namespace base { |
30 class FilePath; | 30 class FilePath; |
31 class SequencedTaskRunner; | 31 class SequencedTaskRunner; |
32 } | 32 } |
33 | 33 |
34 namespace bookmarks { | 34 namespace bookmarks { |
| 35 class BookmarkCodecTest; |
35 class BookmarkExpandedStateTracker; | 36 class BookmarkExpandedStateTracker; |
36 class BookmarkIndex; | 37 class BookmarkIndex; |
37 class BookmarkLoadDetails; | 38 class BookmarkLoadDetails; |
38 class BookmarkStorage; | 39 class BookmarkStorage; |
39 class ScopedGroupBookmarkActions; | 40 class ScopedGroupBookmarkActions; |
40 struct BookmarkMatch; | 41 struct BookmarkMatch; |
41 } | 42 } |
42 | 43 |
43 namespace favicon_base { | 44 namespace favicon_base { |
44 struct FaviconImageResult; | 45 struct FaviconImageResult; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 int64 sync_transaction_version); | 281 int64 sync_transaction_version); |
281 | 282 |
282 // Notify BookmarkModel that the favicons for |urls| have changed and have to | 283 // Notify BookmarkModel that the favicons for |urls| have changed and have to |
283 // be refetched. This notification is sent by BookmarkClient. | 284 // be refetched. This notification is sent by BookmarkClient. |
284 void OnFaviconChanged(const std::set<GURL>& urls); | 285 void OnFaviconChanged(const std::set<GURL>& urls); |
285 | 286 |
286 // Returns the client used by this BookmarkModel. | 287 // Returns the client used by this BookmarkModel. |
287 BookmarkClient* client() const { return client_; } | 288 BookmarkClient* client() const { return client_; } |
288 | 289 |
289 private: | 290 private: |
290 friend class BookmarkCodecTest; | 291 friend class bookmarks::BookmarkCodecTest; |
291 friend class BookmarkModelTest; | |
292 friend class bookmarks::BookmarkStorage; | 292 friend class bookmarks::BookmarkStorage; |
293 friend class bookmarks::ScopedGroupBookmarkActions; | 293 friend class bookmarks::ScopedGroupBookmarkActions; |
294 friend class test::TestBookmarkClient; | 294 friend class test::TestBookmarkClient; |
295 | 295 |
296 // Used to order BookmarkNodes by URL. | 296 // Used to order BookmarkNodes by URL. |
297 class NodeURLComparator { | 297 class NodeURLComparator { |
298 public: | 298 public: |
299 bool operator()(const BookmarkNode* n1, const BookmarkNode* n2) const { | 299 bool operator()(const BookmarkNode* n1, const BookmarkNode* n2) const { |
300 return n1->url() < n2->url(); | 300 return n1->url() < n2->url(); |
301 } | 301 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 | 423 |
424 // See description of IsDoingExtensiveChanges above. | 424 // See description of IsDoingExtensiveChanges above. |
425 int extensive_changes_; | 425 int extensive_changes_; |
426 | 426 |
427 scoped_ptr<bookmarks::BookmarkExpandedStateTracker> expanded_state_tracker_; | 427 scoped_ptr<bookmarks::BookmarkExpandedStateTracker> expanded_state_tracker_; |
428 | 428 |
429 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); | 429 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); |
430 }; | 430 }; |
431 | 431 |
432 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ | 432 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ |
OLD | NEW |