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

Unified Diff: base/threading/thread.h

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/threading/simple_thread.h ('k') | base/threading/thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread.h
diff --git a/base/threading/thread.h b/base/threading/thread.h
index 0bd5d12922f1395bf3a93f99af6207fe27bdd2a4..5126491b3861cdb60f23eec1b40b11466d27a33a 100644
--- a/base/threading/thread.h
+++ b/base/threading/thread.h
@@ -155,25 +155,13 @@ class BASE_EXPORT Thread : PlatformThread::Delegate {
//
MessageLoop* message_loop() const { return message_loop_; }
- // Returns a MessageLoopProxy for this thread. Use the MessageLoopProxy's
- // PostTask methods to execute code on the thread. Returns NULL if the thread
- // is not running (e.g. before Start or after Stop have been called). Callers
- // can hold on to this even after the thread is gone; in this situation,
- // attempts to PostTask() will fail.
- //
- // Note: This method is deprecated. Callers should call task_runner() instead
- // and use the TaskRunner interfaces for safely interfacing with the Thread.
- scoped_refptr<MessageLoopProxy> message_loop_proxy() const {
- return message_loop_ ? message_loop_->message_loop_proxy() : NULL;
- }
-
// Returns a TaskRunner for this thread. Use the TaskRunner's PostTask
// methods to execute code on the thread. Returns NULL if the thread is not
// running (e.g. before Start or after Stop have been called). Callers can
// hold on to this even after the thread is gone; in this situation, attempts
// to PostTask() will fail.
scoped_refptr<SingleThreadTaskRunner> task_runner() const {
- return message_loop_->task_runner();
+ return message_loop_ ? message_loop_->task_runner() : nullptr;
}
// Returns the name of this thread (for display in debugger too).
@@ -188,9 +176,6 @@ class BASE_EXPORT Thread : PlatformThread::Delegate {
// Returns true if the thread has been started, and not yet stopped.
bool IsRunning() const;
- // Sets the thread priority. The thread must already be started.
- void SetPriority(ThreadPriority priority);
-
protected:
// Called just prior to starting the message loop
virtual void Init() {}
« no previous file with comments | « base/threading/simple_thread.h ('k') | base/threading/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698