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

Unified Diff: chrome/browser/profiles/startup_task_runner_service.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 comment. 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/profiles/startup_task_runner_service.cc
diff --git a/chrome/browser/profiles/startup_task_runner_service.cc b/chrome/browser/profiles/startup_task_runner_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..60407e183693472a515d346a63e3639552f13cfa
--- /dev/null
+++ b/chrome/browser/profiles/startup_task_runner_service.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/profiles/startup_task_runner_service.h"
+
+#include "base/deferred_sequenced_task_runner.h"
+#include "base/logging.h"
+#include "chrome/browser/profiles/profile.h"
+
+StartupTaskRunnerService::StartupTaskRunnerService(Profile* profile)
+ : profile_(profile) {
+}
+
+StartupTaskRunnerService::~StartupTaskRunnerService() {
+}
+
+scoped_refptr<base::DeferredSequencedTaskRunner>
+ StartupTaskRunnerService::GetBookmarkTaskRunner() {
+ DCHECK(CalledOnValidThread());
+ if (!bookmark_task_runner_) {
+ bookmark_task_runner_ =
+ new base::DeferredSequencedTaskRunner(profile_->GetIOTaskRunner());
+ }
+ return bookmark_task_runner_;
+}
+
+void StartupTaskRunnerService::StartDeferredTaskRunners() {
+ GetBookmarkTaskRunner()->Start();
+}
« no previous file with comments | « chrome/browser/profiles/startup_task_runner_service.h ('k') | chrome/browser/profiles/startup_task_runner_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698