Index: chrome/browser/bookmarks/bookmark_model.h |
diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h |
index 1f0cf7b793032ce4608c0791dac2461a908c834a..bb7096fade657614b692e89f51034f53d1a4dde7 100644 |
--- a/chrome/browser/bookmarks/bookmark_model.h |
+++ b/chrome/browser/bookmarks/bookmark_model.h |
@@ -10,6 +10,7 @@ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
+#include "base/deferred_sequenced_task_runner.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/observer_list.h" |
@@ -238,6 +239,11 @@ class BookmarkModel : public content::NotificationObserver, |
// BookmarkModel. You need not invoke this directly. |
void Load(); |
+ // Starts loading the bookmarks. This is decoupled from Load, giving the |
+ // caller the possibility to start loading the bookmarks after the |
+ // creation of the BookmarkModel. |
+ void StartLoading(); |
+ |
// Returns true if the model finished loading. |
// This is virtual so it can be mocked. |
virtual bool IsLoaded() const; |
@@ -484,6 +490,10 @@ class BookmarkModel : public content::NotificationObserver, |
// delete the returned object. |
BookmarkLoadDetails* CreateLoadDetails(); |
+ // Returns sequenced task runner where all bookmarks I/O operations are |
+ // performed. |
+ scoped_refptr<base::DeferredSequencedTaskRunner> GetBookmarkTaskRunner(); |
+ |
content::NotificationRegistrar registrar_; |
Profile* profile_; |
@@ -528,6 +538,8 @@ class BookmarkModel : public content::NotificationObserver, |
scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; |
+ scoped_refptr<base::DeferredSequencedTaskRunner> bookmark_task_runner_; |
+ |
DISALLOW_COPY_AND_ASSIGN(BookmarkModel); |
}; |