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

Unified Diff: chrome/browser/bookmarks/bookmark_model_factory.cc

Issue 12952005: Delay bookmarks load while the profile is loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ObjectDestructionOrder unit test. Created 7 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
Index: chrome/browser/bookmarks/bookmark_model_factory.cc
diff --git a/chrome/browser/bookmarks/bookmark_model_factory.cc b/chrome/browser/bookmarks/bookmark_model_factory.cc
index 1f63b6dc6a770abc587c5f3ab2be4fca353972a8..73da8cbe59f96b908d5302b2379c62721cf76eef 100644
--- a/chrome/browser/bookmarks/bookmark_model_factory.cc
+++ b/chrome/browser/bookmarks/bookmark_model_factory.cc
@@ -4,11 +4,14 @@
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
+#include "base/deferred_sequenced_task_runner.h"
#include "base/memory/singleton.h"
#include "base/values.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
+#include "chrome/browser/profiles/startup_task_runner_service.h"
+#include "chrome/browser/profiles/startup_task_runner_service_factory.h"
#include "chrome/common/pref_names.h"
#include "components/user_prefs/pref_registry_syncable.h"
@@ -38,7 +41,8 @@ BookmarkModelFactory::~BookmarkModelFactory() {}
ProfileKeyedService* BookmarkModelFactory::BuildServiceInstanceFor(
Profile* profile) const {
BookmarkModel* bookmark_model = new BookmarkModel(profile);
- bookmark_model->Load();
+ bookmark_model->Load(StartupTaskRunnerServiceFactory::GetForProfile(profile)->
+ GetBookmarkTaskRunner());
return bookmark_model;
}

Powered by Google App Engine
This is Rietveld 408576698