diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 14:53:42 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 14:53:42 +0000 |
commit | 1e7bea3aa8ab6412161e1e526d6d883d7b8bc8e8 (patch) | |
tree | 61264181b2ea29378e7e84621b5e622344e9a262 /remoting | |
parent | c52d1593936f3d84dca0c470002397190263bfe1 (diff) | |
download | chromium_src-1e7bea3aa8ab6412161e1e526d6d883d7b8bc8e8.zip chromium_src-1e7bea3aa8ab6412161e1e526d6d883d7b8bc8e8.tar.gz chromium_src-1e7bea3aa8ab6412161e1e526d6d883d7b8bc8e8.tar.bz2 |
Revert 95414 - Future proof against things like http://crbug.com/91521
BUG=91521
TEST=Remove ffmpegsumo.so from a mac chrome build and attempt to use it as a client in a chromoting session.
Check your logs. You should see Media library not initialized. Also, plugin shouldn't crash.
Review URL: http://codereview.chromium.org/7562016
TBR=dmaclach@chromium.org
Review URL: http://codereview.chromium.org/7576005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95415 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/client/client_context.cc | 20 | ||||
-rw-r--r-- | remoting/client/client_context.h | 10 | ||||
-rw-r--r-- | remoting/client/plugin/chromoting_instance.cc | 12 |
3 files changed, 10 insertions, 32 deletions
diff --git a/remoting/client/client_context.cc b/remoting/client/client_context.cc index 7e5ee7a..5f6d139 100644 --- a/remoting/client/client_context.cc +++ b/remoting/client/client_context.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -7,15 +7,13 @@ #include <string> #include "base/threading/thread.h" -#include "remoting/client/plugin/pepper_util.h" #include "remoting/jingle_glue/jingle_thread.h" namespace remoting { ClientContext::ClientContext() : main_thread_("ChromotingClientMainThread"), - decode_thread_("ChromotingClientDecodeThread"), - started_(false) { + decode_thread_("ChromotingClientDecodeThread") { } ClientContext::~ClientContext() { @@ -23,22 +21,16 @@ ClientContext::~ClientContext() { void ClientContext::Start() { // Start all the threads. - DCHECK(CurrentlyOnPluginThread()); main_thread_.Start(); decode_thread_.Start(); jingle_thread_.Start(); - started_ = true; } void ClientContext::Stop() { - DCHECK(CurrentlyOnPluginThread()); - if (started_) { - // Stop all the threads. - jingle_thread_.Stop(); - decode_thread_.Stop(); - main_thread_.Stop(); - started_ = false; - } + // Stop all the threads. + jingle_thread_.Stop(); + decode_thread_.Stop(); + main_thread_.Stop(); } JingleThread* ClientContext::jingle_thread() { diff --git a/remoting/client/client_context.h b/remoting/client/client_context.h index c28c62e..38c6088 100644 --- a/remoting/client/client_context.h +++ b/remoting/client/client_context.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -13,13 +13,12 @@ namespace remoting { // A class that manages threads and running context for the chromoting client -// process. This class is not designed to be subclassed. +// process. class ClientContext { public: ClientContext(); - ~ClientContext(); + virtual ~ClientContext(); - // Start and Stop must be called from the main plugin thread. void Start(); void Stop(); @@ -41,9 +40,6 @@ class ClientContext { // A thread that handles all decode operations. base::Thread decode_thread_; - // True if Start() was called on the context. - bool started_; - DISALLOW_COPY_AND_ASSIGN(ClientContext); }; diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc index 6a5e1bb..6fabb24 100644 --- a/remoting/client/plugin/chromoting_instance.cc +++ b/remoting/client/plugin/chromoting_instance.cc @@ -21,7 +21,6 @@ // crbug.com/74951 #include "content/renderer/p2p/ipc_network_manager.h" #include "content/renderer/p2p/ipc_socket_factory.h" -#include "media/base/media.h" #include "ppapi/c/dev/ppb_query_policy_dev.h" #include "ppapi/cpp/completion_callback.h" #include "ppapi/cpp/input_event.h" @@ -122,9 +121,7 @@ ChromotingInstance::~ChromotingInstance() { // before we can call Detach() on |view_proxy_|. context_.Stop(); - if (view_proxy_.get()) { - view_proxy_->Detach(); - } + view_proxy_->Detach(); } bool ChromotingInstance::Init(uint32_t argc, @@ -135,13 +132,6 @@ bool ChromotingInstance::Init(uint32_t argc, VLOG(1) << "Started ChromotingInstance::Init"; - // Check to make sure the media library is initialized. - // http://crbug.com/91521. - if (!media::IsMediaLibraryInitialized()) { - logger_.Log(logging::LOG_ERROR, "Media library not initialized."); - return false; - } - // Start all the threads. context_.Start(); |