Chromium Code Reviews| Index: chrome/browser/profiles/startup_task_runner_service.h |
| diff --git a/chrome/browser/profiles/startup_task_runner_service.h b/chrome/browser/profiles/startup_task_runner_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0a4fd0b11e225573f88f343c8e25bb7444c4a5eb |
| --- /dev/null |
| +++ b/chrome/browser/profiles/startup_task_runner_service.h |
| @@ -0,0 +1,35 @@ |
| +// 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. |
| + |
| +#ifndef CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_H_ |
| +#define CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_H_ |
| + |
| +#include "base/deferred_sequenced_task_runner.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/profiles/profile_keyed_service.h" |
| + |
| +class Profile; |
| +class ProfileDownloader; |
| + |
| +// This service manages the startup task runners. |
| +class StartupTaskRunnerService : public ProfileKeyedService { |
|
Jeffrey Yasskin
2013/04/03 16:25:35
There might be a simpler interface here. What if,
Jeffrey Yasskin
2013/04/04 15:26:48
DelayedTaskQueue at https://code.google.com/p/chro
msarda
2013/04/08 17:37:18
I prefer the current interface as it avoids changi
Jeffrey Yasskin
2013/04/08 19:58:30
Sure.
|
| + public: |
| + explicit StartupTaskRunnerService(Profile* profile); |
| + virtual ~StartupTaskRunnerService(); |
| + |
| + // Returns sequenced task runner where all bookmarks I/O operations are |
| + // performed. |
| + scoped_refptr<base::DeferredSequencedTaskRunner> GetBookmarkTaskRunner(); |
|
Jeffrey Yasskin
2013/04/03 16:25:35
Please include a comment about why different servi
msarda
2013/04/08 17:37:18
Done.
|
| + |
| + // Starts the task runners that are deferred during start-up. |
| + void StartDeferredTaskRunners(); |
| + |
| + private: |
| + Profile* profile_; |
| + scoped_refptr<base::DeferredSequencedTaskRunner> bookmark_task_runner_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(StartupTaskRunnerService); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_H_ |