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

Unified Diff: remoting/client/client_context.cc

Issue 7562016: Future proof against things like http://crbug.com/91521 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix up comment Created 9 years, 5 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
Index: remoting/client/client_context.cc
diff --git a/remoting/client/client_context.cc b/remoting/client/client_context.cc
index 5f6d1399ae755264331167542b55c85108dda31b..f77bed3c16f64e02e83b1993d48c6207bbb2000b 100644
--- a/remoting/client/client_context.cc
+++ b/remoting/client/client_context.cc
@@ -13,7 +13,8 @@ namespace remoting {
ClientContext::ClientContext()
: main_thread_("ChromotingClientMainThread"),
- decode_thread_("ChromotingClientDecodeThread") {
+ decode_thread_("ChromotingClientDecodeThread"),
+ started_(false) {
}
ClientContext::~ClientContext() {
@@ -24,13 +25,17 @@ void ClientContext::Start() {
main_thread_.Start();
decode_thread_.Start();
jingle_thread_.Start();
+ started_ = true;
}
void ClientContext::Stop() {
- // Stop all the threads.
- jingle_thread_.Stop();
- decode_thread_.Stop();
- main_thread_.Stop();
+ if (started_) {
+ // Stop all the threads.
+ jingle_thread_.Stop();
+ decode_thread_.Stop();
+ main_thread_.Stop();
+ started_ = false;
+ }
}
JingleThread* ClientContext::jingle_thread() {

Powered by Google App Engine
This is Rietveld 408576698