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

Unified Diff: components/bookmarks/browser/startup_task_runner_service.h

Issue 1165913004: Componentize StartupTaskRunnerService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « components/bookmarks/browser/BUILD.gn ('k') | components/bookmarks/browser/startup_task_runner_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/bookmarks/browser/startup_task_runner_service.h
diff --git a/chrome/browser/profiles/startup_task_runner_service.h b/components/bookmarks/browser/startup_task_runner_service.h
similarity index 76%
rename from chrome/browser/profiles/startup_task_runner_service.h
rename to components/bookmarks/browser/startup_task_runner_service.h
index d8e6b225a80b58c75e7061657ed6ed3000ade6df..f99935f9bb82ec9c661d38d02b204addffe8d490 100644
--- a/chrome/browser/profiles/startup_task_runner_service.h
+++ b/components/bookmarks/browser/startup_task_runner_service.h
@@ -2,25 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_H_
-#define CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_H_
+#ifndef COMPONENTS_BOOKMARKS_BROWSER_STARTUP_TASK_RUNNER_SERVICE_H_
+#define COMPONENTS_BOOKMARKS_BROWSER_STARTUP_TASK_RUNNER_SERVICE_H_
#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
#include "components/keyed_service/core/keyed_service.h"
-class Profile;
-
namespace base {
class DeferredSequencedTaskRunner;
+class SequencedTaskRunner;
} // namespace base
// This service manages the startup task runners.
class StartupTaskRunnerService : public base::NonThreadSafe,
tfarina 2015/06/10 23:18:26 Scott, should we put this in bookmarks namespace?
sky 2015/06/10 23:37:01 Sure.
public KeyedService {
public:
- explicit StartupTaskRunnerService(Profile* profile);
+ explicit StartupTaskRunnerService(
+ const scoped_refptr<base::SequencedTaskRunner>& io_task_runner);
~StartupTaskRunnerService() override;
// Returns sequenced task runner where all bookmarks I/O operations are
@@ -36,10 +37,10 @@ class StartupTaskRunnerService : public base::NonThreadSafe,
void StartDeferredTaskRunners();
private:
- Profile* profile_;
+ scoped_refptr<base::SequencedTaskRunner> io_task_runner_;
scoped_refptr<base::DeferredSequencedTaskRunner> bookmark_task_runner_;
DISALLOW_COPY_AND_ASSIGN(StartupTaskRunnerService);
};
-#endif // CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_H_
+#endif // COMPONENTS_BOOKMARKS_BROWSER_STARTUP_TASK_RUNNER_SERVICE_H_
« no previous file with comments | « components/bookmarks/browser/BUILD.gn ('k') | components/bookmarks/browser/startup_task_runner_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698