summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chrome_thread.cc
diff options
context:
space:
mode:
authorhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 07:04:07 +0000
committerhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 07:04:07 +0000
commit2e7b6282c22188eb4406e9c08ca9a56bac01f047 (patch)
tree70f862c67c0b2b2850659f050929544e0ca33757 /chrome/browser/chrome_thread.cc
parentc984666719a722d4a3666068528cf35f2042d081 (diff)
downloadchromium_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/browser/chrome_thread.cc')
-rw-r--r--chrome/browser/chrome_thread.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/chrome_thread.cc b/chrome/browser/chrome_thread.cc
index f279ed3..a5cbe89 100644
--- a/chrome/browser/chrome_thread.cc
+++ b/chrome/browser/chrome_thread.cc
@@ -59,6 +59,13 @@ ChromeThread::~ChromeThread() {
}
// static
+bool ChromeThread::IsWellKnownThread(ID identifier) {
+ AutoLock lock(lock_);
+ return (identifier >= 0 && identifier < ID_COUNT &&
+ chrome_threads_[identifier]);
+}
+
+// static
bool ChromeThread::CurrentlyOn(ID identifier) {
AutoLock lock(lock_);
DCHECK(identifier >= 0 && identifier < ID_COUNT);