OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_MODEL_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 322 |
323 // Returns the next node ID. | 323 // Returns the next node ID. |
324 int64 next_node_id() const { return next_node_id_; } | 324 int64 next_node_id() const { return next_node_id_; } |
325 | 325 |
326 // Returns the object responsible for tracking the set of expanded nodes in | 326 // Returns the object responsible for tracking the set of expanded nodes in |
327 // the bookmark editor. | 327 // the bookmark editor. |
328 BookmarkExpandedStateTracker* expanded_state_tracker() { | 328 BookmarkExpandedStateTracker* expanded_state_tracker() { |
329 return expanded_state_tracker_.get(); | 329 return expanded_state_tracker_.get(); |
330 } | 330 } |
331 | 331 |
| 332 // Sets whether the mobile folder is visible. This is set by sync. |
| 333 void SetMobileFolderVisible(bool value); |
| 334 |
332 private: | 335 private: |
333 friend class BookmarkCodecTest; | 336 friend class BookmarkCodecTest; |
334 friend class BookmarkModelTest; | 337 friend class BookmarkModelTest; |
335 friend class BookmarkStorage; | 338 friend class BookmarkStorage; |
336 | 339 |
337 // Used to order BookmarkNodes by URL. | 340 // Used to order BookmarkNodes by URL. |
338 class NodeURLComparator { | 341 class NodeURLComparator { |
339 public: | 342 public: |
340 bool operator()(const BookmarkNode* n1, const BookmarkNode* n2) const { | 343 bool operator()(const BookmarkNode* n1, const BookmarkNode* n2) const { |
341 return n1->url() < n2->url(); | 344 return n1->url() < n2->url(); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 scoped_ptr<BookmarkIndex> index_; | 458 scoped_ptr<BookmarkIndex> index_; |
456 | 459 |
457 base::WaitableEvent loaded_signal_; | 460 base::WaitableEvent loaded_signal_; |
458 | 461 |
459 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; | 462 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; |
460 | 463 |
461 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); | 464 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); |
462 }; | 465 }; |
463 | 466 |
464 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 467 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
OLD | NEW |