summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/extension_message_service.cc8
-rw-r--r--chrome/browser/extensions/extension_message_service.h3
-rw-r--r--chrome/browser/profile_manager_unittest.cc4
-rw-r--r--tools/valgrind/memcheck/suppressions.txt8
4 files changed, 5 insertions, 18 deletions
diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc
index ae43bd6..5aaeb73 100644
--- a/chrome/browser/extensions/extension_message_service.cc
+++ b/chrome/browser/extensions/extension_message_service.cc
@@ -115,11 +115,6 @@ ExtensionMessageService::ExtensionMessageService(Profile* profile)
: profile_(profile),
extension_devtools_manager_(NULL),
next_port_id_(0) {
- if (!ChromeThread::GetCurrentThreadIdentifier(&thread_id_)) {
- // If we get created in unit test, GetCurrentThreadIdentifier fails.
- // Assign thread_id_ to an ID not used.
- thread_id_ = ChromeThread::ID_COUNT;
- }
registrar_.Add(this, NotificationType::RENDERER_PROCESS_TERMINATED,
NotificationService::AllSources());
registrar_.Add(this, NotificationType::RENDERER_PROCESS_CLOSED,
@@ -138,8 +133,7 @@ ExtensionMessageService::~ExtensionMessageService() {
void ExtensionMessageService::ProfileDestroyed() {
profile_ = NULL;
if (!registrar_.IsEmpty()) {
- if (thread_id_ != ChromeThread::ID_COUNT)
- CHECK(ChromeThread::CurrentlyOn(thread_id_));
+ CHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
registrar_.RemoveAll();
}
}
diff --git a/chrome/browser/extensions/extension_message_service.h b/chrome/browser/extensions/extension_message_service.h
index a4c6037..b04780c 100644
--- a/chrome/browser/extensions/extension_message_service.h
+++ b/chrome/browser/extensions/extension_message_service.h
@@ -198,9 +198,6 @@ class ExtensionMessageService
// used on the IO thread or the UI thread.
Lock next_port_id_lock_;
- // The thread creating this object. Should be UI thread.
- ChromeThread::ID thread_id_;
-
DISALLOW_COPY_AND_ASSIGN(ExtensionMessageService);
};
diff --git a/chrome/browser/profile_manager_unittest.cc b/chrome/browser/profile_manager_unittest.cc
index e38e68f..bd9e4d2 100644
--- a/chrome/browser/profile_manager_unittest.cc
+++ b/chrome/browser/profile_manager_unittest.cc
@@ -14,6 +14,9 @@
class ProfileManagerTest : public testing::Test {
protected:
+ ProfileManagerTest() : ui_thread_(ChromeThread::UI, &message_loop_) {
+ }
+
virtual void SetUp() {
// Name a subdirectory of the temp directory.
ASSERT_TRUE(PathService::Get(base::DIR_TEMP, &test_dir_));
@@ -30,6 +33,7 @@ class ProfileManagerTest : public testing::Test {
}
MessageLoopForUI message_loop_;
+ ChromeThread ui_thread_;
// the path to temporary directory used to contain the test operations
FilePath test_dir_;
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt
index 621176a..e0d9e32 100644
--- a/tools/valgrind/memcheck/suppressions.txt
+++ b/tools/valgrind/memcheck/suppressions.txt
@@ -1824,14 +1824,6 @@
fun:__cxa_atexit
}
{
- bug_28824
- Memcheck:Leak
- fun:_Znw*
- ...
- fun:_ZN7Profile13CreateProfileERK8FilePath
- fun:_ZN14ProfileManager13CreateProfileERK8FilePath
-}
-{
bug_29069
Memcheck:Leak
fun:_Znw*