Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: base/message_loop/message_loop.h

Issue 1013813003: base: Mark MessageLoop::Post*Task API deprecated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also forward the internal impl to the the task runner. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/message_loop/message_loop.cc » ('j') | base/message_loop/message_loop.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_
6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ 6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 }; 148 };
149 149
150 // Add a DestructionObserver, which will start receiving notifications 150 // Add a DestructionObserver, which will start receiving notifications
151 // immediately. 151 // immediately.
152 void AddDestructionObserver(DestructionObserver* destruction_observer); 152 void AddDestructionObserver(DestructionObserver* destruction_observer);
153 153
154 // Remove a DestructionObserver. It is safe to call this method while a 154 // Remove a DestructionObserver. It is safe to call this method while a
155 // DestructionObserver is receiving a notification callback. 155 // DestructionObserver is receiving a notification callback.
156 void RemoveDestructionObserver(DestructionObserver* destruction_observer); 156 void RemoveDestructionObserver(DestructionObserver* destruction_observer);
157 157
158 // NOTE: Deprecated; prefer task_runner() and the TaskRunner interfaces.
Wez 2015/03/20 04:13:01 Is there a cleanup bug filed to update call-sites
Sami 2015/03/20 17:16:56 I was going to do as part of the linked bug. I've
danakj 2015/03/20 17:19:12 Linking to bugs in TODO is a good practice.
159 //
158 // The "PostTask" family of methods call the task's Run method asynchronously 160 // The "PostTask" family of methods call the task's Run method asynchronously
159 // from within a message loop at some point in the future. 161 // from within a message loop at some point in the future.
160 // 162 //
161 // With the PostTask variant, tasks are invoked in FIFO order, inter-mixed 163 // With the PostTask variant, tasks are invoked in FIFO order, inter-mixed
162 // with normal UI or IO event processing. With the PostDelayedTask variant, 164 // with normal UI or IO event processing. With the PostDelayedTask variant,
163 // tasks are called after at least approximately 'delay_ms' have elapsed. 165 // tasks are called after at least approximately 'delay_ms' have elapsed.
164 // 166 //
165 // The NonNestable variants work similarly except that they promise never to 167 // The NonNestable variants work similarly except that they promise never to
166 // dispatch the task from a nested invocation of MessageLoop::Run. Instead, 168 // dispatch the task from a nested invocation of MessageLoop::Run. Instead,
167 // such tasks get deferred until the top-most MessageLoop::Run is executing. 169 // such tasks get deferred until the top-most MessageLoop::Run is executing.
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 651
650 // Do not add any member variables to MessageLoopForIO! This is important b/c 652 // Do not add any member variables to MessageLoopForIO! This is important b/c
651 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra 653 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra
652 // data that you need should be stored on the MessageLoop's pump_ instance. 654 // data that you need should be stored on the MessageLoop's pump_ instance.
653 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), 655 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO),
654 MessageLoopForIO_should_not_have_extra_member_variables); 656 MessageLoopForIO_should_not_have_extra_member_variables);
655 657
656 } // namespace base 658 } // namespace base
657 659
658 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ 660 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_
OLDNEW
« no previous file with comments | « no previous file | base/message_loop/message_loop.cc » ('j') | base/message_loop/message_loop.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698