Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1888)

Unified Diff: chrome/browser/bookmarks/bookmark_storage.h

Issue 242693003: Introduce BookmarkClient interface to abstract embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work around STL android bug Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model_unittest.cc ('k') | chrome/browser/bookmarks/bookmark_storage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_storage.h
diff --git a/chrome/browser/bookmarks/bookmark_storage.h b/chrome/browser/bookmarks/bookmark_storage.h
index 45eaae9b3cc173f225f0ceadcfedc9c67e480e1e..906a53d711f6333fc0a4bd9bc30b8ca0f19b4b0b 100644
--- a/chrome/browser/bookmarks/bookmark_storage.h
+++ b/chrome/browser/bookmarks/bookmark_storage.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_STORAGE_H_
#define CHROME_BROWSER_BOOKMARKS_BOOKMARK_STORAGE_H_
+#include "base/files/file_path.h"
#include "base/files/important_file_writer.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -115,14 +116,19 @@ class BookmarkLoadDetails {
class BookmarkStorage : public base::ImportantFileWriter::DataSerializer,
public base::RefCountedThreadSafe<BookmarkStorage> {
public:
- // Creates a BookmarkStorage for the specified model
- BookmarkStorage(content::BrowserContext* context,
- BookmarkModel* model,
+ // Creates a BookmarkStorage for the specified model. The data will be loaded
+ // from and saved to a location derived from |profile_path|. The IO code will
+ // be executed as a task in |sequenced_task_runner|.
+ BookmarkStorage(BookmarkModel* model,
+ const base::FilePath& profile_path,
base::SequencedTaskRunner* sequenced_task_runner);
// Loads the bookmarks into the model, notifying the model when done. This
- // takes ownership of |details|. See BookmarkLoadDetails for details.
- void LoadBookmarks(BookmarkLoadDetails* details);
+ // takes ownership of |details| and send the |OnLoadFinished| callback from
+ // a task in |task_runner|. See BookmarkLoadDetails for details.
+ void LoadBookmarks(
+ scoped_ptr<BookmarkLoadDetails> details,
+ const scoped_refptr<base::SequencedTaskRunner>& task_runner);
// Schedules saving the bookmark bar model to disk.
void ScheduleSave();
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model_unittest.cc ('k') | chrome/browser/bookmarks/bookmark_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698