/external/libbrillo/brillo/message_loops/ |
message_loop.cc | 17 base::LazyInstance<base::ThreadLocalPointer<MessageLoop> >::Leaky lazy_tls_ptr = 22 const MessageLoop::TaskId MessageLoop::kTaskIdNull = 0; 24 MessageLoop* MessageLoop::current() { 26 "There isn't a MessageLoop for this thread. You need to initialize it " 31 bool MessageLoop::ThreadHasCurrent() { 35 void MessageLoop::SetAsCurrent() { 37 "There's already a MessageLoop for this thread."; 41 void MessageLoop::ReleaseFromCurrent() [all...] |
message_loop_utils.h | 16 // Run the MessageLoop until the condition passed in |terminate| returns true 19 MessageLoop* loop, 23 // Run the MessageLoop |loop| for up to |iterations| times without blocking. 25 BRILLO_EXPORT int MessageLoopRunMaxIterations(MessageLoop* loop,
|
fake_message_loop.h | 32 class BRILLO_EXPORT FakeMessageLoop : public MessageLoop { 42 using MessageLoop::PostDelayedTask; 48 using MessageLoop::WatchFileDescriptor; 72 std::map<MessageLoop::TaskId, ScheduledTask> tasks_; 78 std::pair<base::Time, MessageLoop::TaskId>, 79 std::vector<std::pair<base::Time, MessageLoop::TaskId>>, 80 std::greater<std::pair<base::Time, MessageLoop::TaskId>>> fire_order_; 84 std::multimap<std::pair<int, WatchMode>, MessageLoop::TaskId> fds_watched_; 92 MessageLoop::TaskId last_id_ = kTaskIdNull;
|
base_message_loop.h | 8 // BaseMessageLoop is a brillo::MessageLoop implementation based on 10 // brillo::MessageLoop and legacy code using base::MessageLoopForIO in the 30 class BRILLO_EXPORT BaseMessageLoop : public MessageLoop { 41 // MessageLoop overrides. 45 using MessageLoop::PostDelayedTask; 51 using MessageLoop::WatchFileDescriptor; 74 void OnRanPostedTask(MessageLoop::TaskId task_id); 80 void OnFileReadyPostedTask(MessageLoop::TaskId task_id); 91 MessageLoop::TaskId task_id; 99 MessageLoop::TaskId task_id [all...] |
glib_message_loop.h | 20 class BRILLO_EXPORT GlibMessageLoop : public MessageLoop { 25 // MessageLoop overrides. 29 using MessageLoop::PostDelayedTask; 35 using MessageLoop::WatchFileDescriptor; 68 MessageLoop::TaskId task_id; 74 std::map<MessageLoop::TaskId, ScheduledTask*> tasks_; 76 MessageLoop::TaskId last_id_ = kTaskIdNull;
|
message_loop_unittest.cc | 7 // These are the common tests for all the brillo::MessageLoop implementations 31 using TaskId = MessageLoop::TaskId; 43 std::unique_ptr<MessageLoop> loop_; 46 // These MessageLoopSetUp() methods are used to setup each MessageLoop 71 EXPECT_FALSE(this->loop_->CancelTask(MessageLoop::kTaskIdNull)); 79 EXPECT_NE(MessageLoop::kTaskIdNull, task_id); 102 EXPECT_NE(MessageLoop::kTaskIdNull, task_id); 112 // MessageLoop. This is important because only one of the two methods is 121 EXPECT_EQ(MessageLoop::kTaskIdNull, this->loop_->WatchFileDescriptor( 122 FROM_HERE, -1, MessageLoop::kWatchRead, true [all...] |
glib_message_loop_unittest.cc | 25 using TaskId = MessageLoop::TaskId; 44 FROM_HERE, fd, MessageLoop::kWatchRead, true, 46 EXPECT_NE(MessageLoop::kTaskIdNull, task_id); 57 FROM_HERE, fd, MessageLoop::kWatchRead, true, 63 EXPECT_NE(MessageLoop::kTaskIdNull, task_id);
|
message_loop.h | 17 class BRILLO_EXPORT MessageLoop { 19 virtual ~MessageLoop(); 28 // Return the MessageLoop for the current thread. It is a fatal error to 29 // request the current MessageLoop if SetAsCurrent() was not called on the 32 static MessageLoop* current(); 34 // Return whether there is a MessageLoop in the current thread. 123 MessageLoop() = default; 130 DISALLOW_COPY_AND_ASSIGN(MessageLoop);
|
message_loop_utils.cc | 13 MessageLoop* loop, 17 MessageLoop::TaskId task_id = loop->PostDelayedTask( 29 int MessageLoopRunMaxIterations(MessageLoop* loop, int iterations) {
|
/external/libbrillo/brillo/ |
binder_watcher.h | 25 // Bridge between libbinder and brillo::MessageLoop. Construct at startup to 30 // the current MessageLoop otherwise. 31 explicit BinderWatcher(MessageLoop* message_loop); 39 MessageLoop::TaskId task_id_{MessageLoop::kTaskIdNull}; 40 MessageLoop* message_loop_;
|
binder_watcher.cc | 36 BinderWatcher::BinderWatcher(MessageLoop* message_loop) 42 if (task_id_ != MessageLoop::kTaskIdNull) 48 message_loop_ = MessageLoop::current(); 50 LOG(ERROR) << "Must initialize a brillo::MessageLoop to use BinderWatcher"; 72 MessageLoop::kWatchRead, 75 if (task_id_ == MessageLoop::kTaskIdNull) {
|
/system/update_engine/ |
proxy_resolver.cc | 22 using brillo::MessageLoop; 29 const ProxyRequestId kProxyRequestIdNull = brillo::MessageLoop::kTaskIdNull; 32 if (idle_callback_id_ != MessageLoop::kTaskIdNull) { 36 // MessageLoop::current() since the unit test using a FakeSystemState may 37 // have not define a MessageLoop for the current thread. 38 MessageLoop::current()->CancelTask(idle_callback_id_); 39 idle_callback_id_ = MessageLoop::kTaskIdNull; 45 idle_callback_id_ = MessageLoop::current()->PostTask( 54 return MessageLoop::current()->CancelTask(request); 58 idle_callback_id_ = MessageLoop::kTaskIdNull [all...] |
dbus_test_utils.h | 44 if (callback_connected_task_ != brillo::MessageLoop::kTaskIdNull) 45 brillo::MessageLoop::current()->CancelTask(callback_connected_task_); 60 callback_connected_task_ = brillo::MessageLoop::current()->PostTask( 68 callback_connected_task_ = brillo::MessageLoop::kTaskIdNull; 72 brillo::MessageLoop::TaskId callback_connected_task_{ 73 brillo::MessageLoop::kTaskIdNull};
|
/system/update_engine/common/ |
mock_http_fetcher.cc | 29 using brillo::MessageLoop; 35 CHECK(timeout_id_ == MessageLoop::kTaskIdNull) << 56 return timeout_id_ != MessageLoop::kTaskIdNull; 68 return timeout_id_ != MessageLoop::kTaskIdNull; 81 return timeout_id_ != MessageLoop::kTaskIdNull; 84 if (timeout_id_ != MessageLoop::kTaskIdNull) { 89 timeout_id_ = MessageLoop::current()->PostDelayedTask( 101 timeout_id_ = MessageLoop::current()->PostDelayedTask( 106 timeout_id_ = MessageLoop::kTaskIdNull; 116 MessageLoop::current()->CancelTask(timeout_id_) [all...] |
cpu_limiter.h | 61 brillo::MessageLoop::TaskId manage_shares_id_{ 62 brillo::MessageLoop::kTaskIdNull};
|
cpu_limiter.cc | 44 if (manage_shares_id_ != brillo::MessageLoop::kTaskIdNull) { 48 manage_shares_id_ = brillo::MessageLoop::current()->PostDelayedTask( 56 if (manage_shares_id_ != brillo::MessageLoop::kTaskIdNull) { 59 brillo::MessageLoop::current()->CancelTask(manage_shares_id_); 60 manage_shares_id_ = brillo::MessageLoop::kTaskIdNull; 85 manage_shares_id_ = brillo::MessageLoop::kTaskIdNull;
|
/external/libchrome/base/message_loop/ |
message_loop.cc | 48 LazyInstance<base::ThreadLocalPointer<MessageLoop> >::Leaky lazy_tls_ptr = 92 MessageLoop::MessagePumpFactory* message_pump_for_ui_factory_ = NULL; 116 MessageLoop::TaskObserver::TaskObserver() { 119 MessageLoop::TaskObserver::~TaskObserver() { 122 MessageLoop::DestructionObserver::~DestructionObserver() { 125 MessageLoop::NestingObserver::~NestingObserver() {} 129 MessageLoop::MessageLoop(Type type) 130 : MessageLoop(type, MessagePumpFactoryCallback()) { 134 MessageLoop::MessageLoop(std::unique_ptr<MessagePump> pump [all...] |
incoming_task_queue.h | 18 class MessageLoop; 25 // threads and together with MessageLoop ensures clean shutdown. 29 explicit IncomingTaskQueue(MessageLoop* message_loop); 93 MessageLoop* message_loop_;
|
message_loop.h | 47 // A MessageLoop is used to process events for a particular thread. There is 48 // at most one MessageLoop instance per thread. 51 // variants. Depending on the type of message pump used by the MessageLoop 56 // NOTE: Unless otherwise specified, a MessageLoop's methods may only be called 57 // on the thread where the MessageLoop's Run method executes. 59 // NOTE: MessageLoop has task reentrancy protection. This means that if a 70 // MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current()); 78 class BASE_EXPORT MessageLoop : public MessagePump::Delegate { 80 // A MessageLoop has a particular type, which indicates the set o [all...] |
message_loop_test.cc | 77 MessageLoop::current()->QuitWhenIdle(); 81 // useful for building a variety of MessageLoop tests. 96 MessageLoop loop(std::move(pump)); 100 MessageLoop::current()->task_runner()->PostTask(FROM_HERE, 102 MessageLoop::current()->task_runner()->PostTask( 104 MessageLoop::current()->task_runner()->PostTask( 106 MessageLoop::current()->task_runner()->PostTask( 108 MessageLoop::current()->task_runner()->PostTask( 110 MessageLoop::current()->task_runner()->PostTask( 113 MessageLoop::current()->task_runner()->PostTask [all...] |
message_loop_task_runner_unittest.cc | 27 : current_loop_(new MessageLoop()), 40 // Allow us to pause the |task_thread_|'s MessageLoop. 59 LoopRecorder(MessageLoop** run_on, 60 MessageLoop** deleted_on, 66 void RecordRun() { *run_on_ = MessageLoop::current(); } 71 *deleted_on_ = MessageLoop::current(); 75 MessageLoop** run_on_; 76 MessageLoop** deleted_on_; 86 MessageLoop::current()->QuitWhenIdle(); 95 std::unique_ptr<MessageLoop> current_loop_ [all...] |
/external/libmojo/base/android/ |
java_handler_thread.h | 16 class MessageLoop; 31 base::MessageLoop* message_loop() const { return message_loop_.get(); } 47 std::unique_ptr<base::MessageLoop> message_loop_;
|
/external/libmojo/mojo/android/system/ |
base_run_loop.cc | 22 base::MessageLoop* message_loop = 23 new base::MessageLoop(common::MessagePumpMojo::Create()); 30 reinterpret_cast<base::MessageLoop*>(runLoopID)->Run(); 36 reinterpret_cast<base::MessageLoop*>(runLoopID)->RunUntilIdle(); 42 reinterpret_cast<base::MessageLoop*>(runLoopID)->QuitWhenIdle(); 61 reinterpret_cast<base::MessageLoop*>(runLoopID)->PostDelayedTask( 69 base::MessageLoop* message_loop = 70 reinterpret_cast<base::MessageLoop*>(runLoopID);
|
/external/libchrome/base/timer/ |
timer_unittest.cc | 25 const base::MessageLoop::Type testing_message_loops[] = { 26 base::MessageLoop::TYPE_DEFAULT, 27 base::MessageLoop::TYPE_IO, 29 base::MessageLoop::TYPE_UI, 57 base::MessageLoop::current()->QuitWhenIdle(); 81 base::MessageLoop::current()->QuitWhenIdle(); 103 base::MessageLoop::current()->QuitWhenIdle(); 113 void RunTest_OneShotTimer(base::MessageLoop::Type message_loop_type) { 114 base::MessageLoop loop(message_loop_type); 125 void RunTest_OneShotTimer_Cancel(base::MessageLoop::Type message_loop_type) [all...] |
/external/libchrome/base/threading/ |
thread.cc | 27 // MessageLoop::QuitWhenIdle() is called directly, which is unexpected when 28 // using a Thread to setup and run a MessageLoop. 36 MessageLoop::current()->QuitWhenIdle(); 41 : message_loop_type(MessageLoop::TYPE_DEFAULT), 47 Thread::Options::Options(MessageLoop::Type type, 86 options.message_loop_type = MessageLoop::TYPE_UI; 95 (options.message_loop_type == MessageLoop::TYPE_UI)); 104 MessageLoop::Type type = options.message_loop_type; 106 type = MessageLoop::TYPE_CUSTOM; 109 std::unique_ptr<MessageLoop> message_loop [all...] |