OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_H_ | |
6 #define CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_H_ | |
7 | |
8 #include "base/deferred_sequenced_task_runner.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "chrome/browser/profiles/profile_keyed_service.h" | |
11 | |
12 class Profile; | |
13 class ProfileDownloader; | |
14 | |
15 // This service manages the startup task runners. | |
16 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.
| |
17 public: | |
18 explicit StartupTaskRunnerService(Profile* profile); | |
19 virtual ~StartupTaskRunnerService(); | |
20 | |
21 // Returns sequenced task runner where all bookmarks I/O operations are | |
22 // performed. | |
23 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.
| |
24 | |
25 // Starts the task runners that are deferred during start-up. | |
26 void StartDeferredTaskRunners(); | |
27 | |
28 private: | |
29 Profile* profile_; | |
30 scoped_refptr<base::DeferredSequencedTaskRunner> bookmark_task_runner_; | |
31 | |
32 DISALLOW_COPY_AND_ASSIGN(StartupTaskRunnerService); | |
33 }; | |
34 | |
35 #endif // CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_H_ | |
OLD | NEW |