summaryrefslogtreecommitdiffstats
path: root/chrome/common/chrome_plugin_util.cc
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-26 05:55:10 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-26 05:55:10 +0000
commitab820df141e6ab45fd8a095d2f57f91df44e6c9c (patch)
tree20ae83601c4a484cd74c908b62bc9d702ef27996 /chrome/common/chrome_plugin_util.cc
parent4d9bdfafcd1393385860bc9fe947e0c07719c0f4 (diff)
downloadchromium_src-ab820df141e6ab45fd8a095d2f57f91df44e6c9c.zip
chromium_src-ab820df141e6ab45fd8a095d2f57f91df44e6c9c.tar.gz
chromium_src-ab820df141e6ab45fd8a095d2f57f91df44e6c9c.tar.bz2
Chrome changes corresponding to my message_loop_type CL.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_plugin_util.cc')
-rw-r--r--chrome/common/chrome_plugin_util.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/chrome/common/chrome_plugin_util.cc b/chrome/common/chrome_plugin_util.cc
index 1a33990..56b1f54 100644
--- a/chrome/common/chrome_plugin_util.cc
+++ b/chrome/common/chrome_plugin_util.cc
@@ -46,18 +46,14 @@ void PluginHelper::DestroyAllHelpersForPlugin(ChromePluginLib* plugin) {
}
PluginHelper::PluginHelper(ChromePluginLib* plugin) : plugin_(plugin) {
-#ifndef NDEBUG
- message_loop_ = MessageLoop::current();
-#endif
+ DCHECK(CalledOnValidThread());
NotificationService::current()->AddObserver(
this, NOTIFY_CHROME_PLUGIN_UNLOADED,
Source<ChromePluginLib>(plugin_));
}
PluginHelper::~PluginHelper() {
-#ifndef NDEBUG
- DCHECK(MessageLoop::current() == message_loop_);
-#endif
+ DCHECK(CalledOnValidThread());
NotificationService::current()->RemoveObserver(
this, NOTIFY_CHROME_PLUGIN_UNLOADED,
Source<ChromePluginLib>(plugin_));
@@ -66,9 +62,7 @@ PluginHelper::~PluginHelper() {
void PluginHelper::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
-#ifndef NDEBUG
- DCHECK(MessageLoop::current() == message_loop_);
-#endif
+ DCHECK(CalledOnValidThread());
DCHECK(type == NOTIFY_CHROME_PLUGIN_UNLOADED);
DCHECK(plugin_ == Source<ChromePluginLib>(source).ptr());