Chromium Code Reviews| 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..a86c847f922b1db256e755c9640d37782e61cd1b |
| --- /dev/null |
| +++ b/chrome/browser/profiles/startup_task_runner_service.cc |
| @@ -0,0 +1,29 @@ |
| +// 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/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()); |
|
erikwright (departed)
2013/04/15 17:56:25
Why not eliminate a dependency on profile.h by tak
msarda
2013/04/17 09:53:55
I don't see the fact that this service holds profi
erikwright (departed)
2013/04/17 14:41:19
Across the project we are actively trying to reduc
Miranda Callahan
2013/04/17 15:35:12
I think Erik is right that this basic structure sh
|
| + } |
| + return bookmark_task_runner_; |
| +} |
| + |
| +void StartupTaskRunnerService::StartDeferredTaskRunners() { |
| + GetBookmarkTaskRunner()->Start(); |
| +} |