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" | |
erikwright (departed)
2013/04/15 17:56:25
forward-decl should be sufficient?
msarda
2013/04/17 09:53:55
Done.
erikwright (departed)
2013/04/17 14:41:19
Oops, not done, you can remove the #include here.
msarda
2013/04/17 15:29:10
Done for real now.
| |
9 #include "base/memory/scoped_ptr.h" | |
erikwright (departed)
2013/04/15 17:56:25
not required?
msarda
2013/04/17 09:53:55
Done.
| |
10 #include "base/threading/non_thread_safe.h" | |
11 #include "chrome/browser/profiles/profile_keyed_service.h" | |
12 | |
13 class Profile; | |
14 class ProfileDownloader; | |
erikwright (departed)
2013/04/15 17:56:25
Not required?
msarda
2013/04/17 09:53:55
Done.
| |
15 | |
16 // This service manages the startup task runners. | |
17 class StartupTaskRunnerService : public base::NonThreadSafe, | |
18 public ProfileKeyedService { | |
19 public: | |
20 explicit StartupTaskRunnerService(Profile* profile); | |
21 virtual ~StartupTaskRunnerService(); | |
22 | |
23 // Returns sequenced task runner where all bookmarks I/O operations are | |
24 // performed. | |
25 // This method should only be called from the UI thread. | |
26 // Note: Using a separate task runner per profile service gives a better | |
27 // management of the sequence in which the task are started in order to avoid | |
28 // congestion during start-up (e.g the caller may decide to start loading the | |
29 // bookmarks only after the history finished). | |
30 scoped_refptr<base::DeferredSequencedTaskRunner> GetBookmarkTaskRunner(); | |
erikwright (departed)
2013/04/15 17:56:25
include ref_counted.h
msarda
2013/04/17 09:53:55
Done.
| |
31 | |
32 // Starts the task runners that are deferred during start-up. | |
33 void StartDeferredTaskRunners(); | |
34 | |
35 private: | |
36 Profile* profile_; | |
37 scoped_refptr<base::DeferredSequencedTaskRunner> bookmark_task_runner_; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(StartupTaskRunnerService); | |
erikwright (departed)
2013/04/15 17:56:25
basic_types.h
msarda
2013/04/17 09:53:55
Done.
| |
40 }; | |
41 | |
42 #endif // CHROME_BROWSER_PROFILES_STARTUP_TASK_RUNNER_SERVICE_H_ | |
OLD | NEW |