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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 12952005: Delay bookmarks load while the profile is loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix testing_profile.h Created 7 years, 9 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/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 7faecf0058a6eea84484daa9bcfe70c0729a0ba2..e0645bc49446e4454c43b76d38032145b093d6a5 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
+#include "base/deferred_sequenced_task_runner.h"
#include "base/environment.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
@@ -345,7 +346,6 @@ ProfileImpl::ProfileImpl(
predictor_(NULL) {
DCHECK(!path.empty()) << "Using an empty path will attempt to write " <<
"profile files to the root directory!";
-
#if defined(ENABLE_SESSION_SERVICE)
create_session_service_timer_.Start(FROM_HERE,
TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this,
@@ -663,6 +663,15 @@ scoped_refptr<base::SequencedTaskRunner> ProfileImpl::GetIOTaskRunner() {
GetPath(), BrowserThread::GetBlockingPool());
}
+scoped_refptr<base::DeferredSequencedTaskRunner>
+ ProfileImpl::GetBookmarksTaskRunner() {
+ if (!bookmarks_task_runner_) {
+ bookmarks_task_runner_ =
+ new base::DeferredSequencedTaskRunner(GetIOTaskRunner());
+ }
+ return bookmarks_task_runner_;
+}
+
bool ProfileImpl::IsOffTheRecord() const {
return false;
}
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698