diff options
author | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-04 07:04:07 +0000 |
---|---|---|
committer | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-04 07:04:07 +0000 |
commit | 2e7b6282c22188eb4406e9c08ca9a56bac01f047 (patch) | |
tree | 70f862c67c0b2b2850659f050929544e0ca33757 /chrome/common/notification_registrar.h | |
parent | c984666719a722d4a3666068528cf35f2042d081 (diff) | |
download | chromium_src-2e7b6282c22188eb4406e9c08ca9a56bac01f047.zip chromium_src-2e7b6282c22188eb4406e9c08ca9a56bac01f047.tar.gz chromium_src-2e7b6282c22188eb4406e9c08ca9a56bac01f047.tar.bz2 |
Adding instrument to NotificationRegistrar to check
Add() and Remove() are called from same thread.
Note I already checked in a fix for the bug. The CL
is trying to check whether the issue exists in other
code path.
TEST=none
BUG=27834
Review URL: http://codereview.chromium.org/449044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33802 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/notification_registrar.h')
-rw-r--r-- | chrome/common/notification_registrar.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/common/notification_registrar.h b/chrome/common/notification_registrar.h index ef21ff2..7f6956a 100644 --- a/chrome/common/notification_registrar.h +++ b/chrome/common/notification_registrar.h @@ -8,6 +8,7 @@ #include <vector> #include "base/basictypes.h" +#include "chrome/browser/chrome_thread.h" #include "chrome/common/notification_observer.h" // Aids in registering for notifications and ensures that all registered @@ -39,6 +40,8 @@ class NotificationRegistrar { bool IsEmpty() const; private: + void CheckCalledOnValidWellKnownThread(); + struct Record; // We keep registered notifications in a simple vector. This means we'll do @@ -50,6 +53,9 @@ class NotificationRegistrar { // Lists all notifications we're currently registered for. RecordVector registered_; + // The thread creating this object. + ChromeThread::ID thread_id_; + DISALLOW_COPY_AND_ASSIGN(NotificationRegistrar); }; |