| 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_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 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // BookmarkModel provides a directed acyclic graph of URLs and folders. | 223 // BookmarkModel provides a directed acyclic graph of URLs and folders. |
| 224 // Three graphs are provided for the three entry points: those on the 'bookmarks | 224 // Three graphs are provided for the three entry points: those on the 'bookmarks |
| 225 // bar', those in the 'other bookmarks' folder and those in the 'mobile' folder. | 225 // bar', those in the 'other bookmarks' folder and those in the 'mobile' folder. |
| 226 // | 226 // |
| 227 // An observer may be attached to observe relevant events. | 227 // An observer may be attached to observe relevant events. |
| 228 // | 228 // |
| 229 // You should NOT directly create a BookmarkModel, instead go through the | 229 // You should NOT directly create a BookmarkModel, instead go through the |
| 230 // BookmarkModelFactory. | 230 // BookmarkModelFactory. |
| 231 class BookmarkModel : public content::NotificationObserver, | 231 class BookmarkModel : public content::NotificationObserver, |
| 232 public BookmarkService, | 232 public BookmarkService, |
| 233 public ProfileKeyedService { | 233 public BrowserContextKeyedService { |
| 234 public: | 234 public: |
| 235 explicit BookmarkModel(Profile* profile); | 235 explicit BookmarkModel(Profile* profile); |
| 236 virtual ~BookmarkModel(); | 236 virtual ~BookmarkModel(); |
| 237 | 237 |
| 238 // Invoked prior to destruction to release any necessary resources. | 238 // Invoked prior to destruction to release any necessary resources. |
| 239 virtual void Shutdown() OVERRIDE; | 239 virtual void Shutdown() OVERRIDE; |
| 240 | 240 |
| 241 // Loads the bookmarks. This is called upon creation of the | 241 // Loads the bookmarks. This is called upon creation of the |
| 242 // BookmarkModel. You need not invoke this directly. | 242 // BookmarkModel. You need not invoke this directly. |
| 243 // All load operations will be executed on |task_runner|. | 243 // All load operations will be executed on |task_runner|. |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 | 543 |
| 544 // See description of IsDoingExtensiveChanges above. | 544 // See description of IsDoingExtensiveChanges above. |
| 545 int extensive_changes_; | 545 int extensive_changes_; |
| 546 | 546 |
| 547 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; | 547 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; |
| 548 | 548 |
| 549 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); | 549 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); |
| 550 }; | 550 }; |
| 551 | 551 |
| 552 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 552 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
| OLD | NEW |