tracked_objects::Location --> base::Location

This commit is contained in:
Samuel Attard 2017-12-18 13:35:17 +11:00 committed by Aleksei Kuzmin
parent 1158d35021
commit 6402b23041
6 changed files with 12 additions and 13 deletions

View file

@ -22,7 +22,7 @@ void BridgeTaskRunner::MessageLoopIsReady() {
} }
bool BridgeTaskRunner::PostDelayedTask( bool BridgeTaskRunner::PostDelayedTask(
const tracked_objects::Location& from_here, const base::Location& from_here,
base::OnceClosure task, base::OnceClosure task,
base::TimeDelta delay) { base::TimeDelta delay) {
auto message_loop = base::MessageLoop::current(); auto message_loop = base::MessageLoop::current();
@ -44,7 +44,7 @@ bool BridgeTaskRunner::RunsTasksInCurrentSequence() const {
} }
bool BridgeTaskRunner::PostNonNestableDelayedTask( bool BridgeTaskRunner::PostNonNestableDelayedTask(
const tracked_objects::Location& from_here, const base::Location& from_here,
base::OnceClosure task, base::OnceClosure task,
base::TimeDelta delay) { base::TimeDelta delay) {
auto message_loop = base::MessageLoop::current(); auto message_loop = base::MessageLoop::current();

View file

@ -8,6 +8,7 @@
#include <tuple> #include <tuple>
#include <vector> #include <vector>
#include "base/location.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "base/tuple.h" #include "base/tuple.h"
@ -24,18 +25,18 @@ class BridgeTaskRunner : public base::SingleThreadTaskRunner {
void MessageLoopIsReady(); void MessageLoopIsReady();
// base::SingleThreadTaskRunner: // base::SingleThreadTaskRunner:
bool PostDelayedTask(const tracked_objects::Location& from_here, bool PostDelayedTask(const base::Location& from_here,
base::OnceClosure task, base::OnceClosure task,
base::TimeDelta delay) override; base::TimeDelta delay) override;
bool RunsTasksInCurrentSequence() const override; bool RunsTasksInCurrentSequence() const override;
bool PostNonNestableDelayedTask( bool PostNonNestableDelayedTask(
const tracked_objects::Location& from_here, const base::Location& from_here,
base::OnceClosure task, base::OnceClosure task,
base::TimeDelta delay) override; base::TimeDelta delay) override;
private: private:
using TaskPair = std::tuple< using TaskPair = std::tuple<
tracked_objects::Location, base::OnceClosure, base::TimeDelta>; base::Location, base::OnceClosure, base::TimeDelta>;
std::vector<TaskPair> tasks_; std::vector<TaskPair> tasks_;
std::vector<TaskPair> non_nestable_tasks_; std::vector<TaskPair> non_nestable_tasks_;

View file

@ -424,7 +424,7 @@ bool PrintJobWorker::IsRunning() const {
return thread_.IsRunning(); return thread_.IsRunning();
} }
bool PrintJobWorker::PostTask(const tracked_objects::Location& from_here, bool PrintJobWorker::PostTask(const base::Location& from_here,
const base::Closure& task) { const base::Closure& task) {
if (task_runner_.get()) if (task_runner_.get())
return task_runner_->PostTask(from_here, task); return task_runner_->PostTask(from_here, task);

View file

@ -7,6 +7,7 @@
#include <memory> #include <memory>
#include "base/location.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
@ -76,7 +77,7 @@ class PrintJobWorker {
bool IsRunning() const; bool IsRunning() const;
// Posts the given task to be run. // Posts the given task to be run.
bool PostTask(const tracked_objects::Location& from_here, bool PostTask(const base::Location& from_here,
const base::Closure& task); const base::Closure& task);
// Signals the thread to exit in the near future. // Signals the thread to exit in the near future.

View file

@ -20,7 +20,7 @@ bool PrintJobWorkerOwner::RunsTasksInCurrentSequence() const {
return task_runner_->RunsTasksInCurrentSequence(); return task_runner_->RunsTasksInCurrentSequence();
} }
bool PrintJobWorkerOwner::PostTask(const tracked_objects::Location& from_here, bool PrintJobWorkerOwner::PostTask(const base::Location& from_here,
const base::Closure& task) { const base::Closure& task) {
return task_runner_->PostTask(from_here, task); return task_runner_->PostTask(from_here, task);
} }

View file

@ -7,6 +7,7 @@
#include <memory> #include <memory>
#include "base/location.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "printing/printing_context.h" #include "printing/printing_context.h"
@ -15,10 +16,6 @@ class MessageLoop;
class SequencedTaskRunner; class SequencedTaskRunner;
} }
namespace tracked_objects {
class Location;
}
namespace printing { namespace printing {
class PrintJobWorker; class PrintJobWorker;
@ -51,7 +48,7 @@ class PrintJobWorkerOwner
bool RunsTasksInCurrentSequence() const; bool RunsTasksInCurrentSequence() const;
// Posts the given task to be run. // Posts the given task to be run.
bool PostTask(const tracked_objects::Location& from_here, bool PostTask(const base::Location& from_here,
const base::Closure& task); const base::Closure& task);
protected: protected: