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

Unified Diff: remoting/base/auto_thread.h

Issue 2373033002: Remove call to MessageLoop::QuitWhenIdle() in auto_thread.cc. (Closed)
Patch Set: fix test error Created 4 years, 3 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 | « no previous file | remoting/base/auto_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/auto_thread.h
diff --git a/remoting/base/auto_thread.h b/remoting/base/auto_thread.h
index 943d02f6574fa867da04e4f11c0fe46fc9273851..7cd5cca458c4b629dac8b4a0e947932ca20316eb 100644
--- a/remoting/base/auto_thread.h
+++ b/remoting/base/auto_thread.h
@@ -7,9 +7,11 @@
#include <string>
+#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/threading/platform_thread.h"
+#include "base/threading/thread_checker.h"
#include "build/build_config.h"
#include "remoting/base/auto_thread_task_runner.h"
@@ -81,7 +83,7 @@ class AutoThread : base::PlatformThread::Delegate {
private:
AutoThread(const char* name, AutoThreadTaskRunner* joiner);
- void QuitThread(scoped_refptr<base::SingleThreadTaskRunner> task_runner);
+ void QuitThread(const base::Closure& quit_when_idle_closure);
void JoinAndDeleteThread();
// base::PlatformThread::Delegate methods:
@@ -109,6 +111,9 @@ class AutoThread : base::PlatformThread::Delegate {
// AutoThreadTaskRunner to post a task to to join & delete this thread.
scoped_refptr<AutoThreadTaskRunner> joiner_;
+ // Verifies that QuitThread() is called on the same thread as ThreadMain().
+ base::ThreadChecker thread_checker_;
+
DISALLOW_COPY_AND_ASSIGN(AutoThread);
};
« no previous file with comments | « no previous file | remoting/base/auto_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698