OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/printing/print_job_worker_owner.h" | 5 #include "chrome/browser/printing/print_job_worker_owner.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 | 10 |
11 namespace printing { | 11 namespace printing { |
12 | 12 |
13 PrintJobWorkerOwner::PrintJobWorkerOwner() | 13 PrintJobWorkerOwner::PrintJobWorkerOwner() |
14 : task_runner_(base::ThreadTaskRunnerHandle::Get()) {} | 14 : task_runner_(base::ThreadTaskRunnerHandle::Get()) {} |
15 | 15 |
16 PrintJobWorkerOwner::~PrintJobWorkerOwner() { | 16 PrintJobWorkerOwner::~PrintJobWorkerOwner() { |
17 } | 17 } |
18 | 18 |
19 bool PrintJobWorkerOwner::RunsTasksOnCurrentThread() const { | 19 bool PrintJobWorkerOwner::RunsTasksInCurrentSequence() const { |
20 return task_runner_->RunsTasksOnCurrentThread(); | 20 return task_runner_->RunsTasksInCurrentSequence(); |
21 } | 21 } |
22 | 22 |
23 bool PrintJobWorkerOwner::PostTask(const tracked_objects::Location& from_here, | 23 bool PrintJobWorkerOwner::PostTask(const tracked_objects::Location& from_here, |
24 const base::Closure& task) { | 24 const base::Closure& task) { |
25 return task_runner_->PostTask(from_here, task); | 25 return task_runner_->PostTask(from_here, task); |
26 } | 26 } |
27 | 27 |
28 } // namespace printing | 28 } // namespace printing |
OLD | NEW |