Index: chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc |
diff --git a/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc b/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc |
index 991b774d4be1ddb190c653a23d41f8447512d762..5dd0bbf175b96c802b6c68a1c4eb0a8130075906 100644 |
--- a/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc |
+++ b/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc |
@@ -4,6 +4,8 @@ |
#include "chrome/browser/sync/glue/chrome_sync_notification_bridge.h" |
+#include <cstddef> |
+ |
#include "base/compiler_specific.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
@@ -32,6 +34,8 @@ using ::testing::NiceMock; |
using ::testing::StrictMock; |
using content::BrowserThread; |
+const char kHandlerName[] = "FakeSyncNotifierObserver"; |
+ |
// Receives a ChromeSyncNotificationBridge to register to, and an expected |
// ModelTypePayloadMap. ReceivedProperNotification() will return true only |
// if the observer has received a notification with the proper source and |
@@ -53,14 +57,15 @@ class FakeSyncNotifierObserver : public syncer::SyncNotifierObserver { |
expected_payloads_(expected_payloads), |
expected_source_(expected_source) { |
DCHECK(sync_task_runner_->RunsTasksOnCurrentThread()); |
+ bridge_->SetHandler(kHandlerName, this); |
const syncer::ObjectIdSet& ids = |
syncer::ObjectIdPayloadMapToSet(expected_payloads); |
- bridge_->UpdateRegisteredIds(this, ids); |
+ bridge_->UpdateRegisteredIds(kHandlerName, ids); |
} |
virtual ~FakeSyncNotifierObserver() { |
DCHECK(sync_task_runner_->RunsTasksOnCurrentThread()); |
- bridge_->UpdateRegisteredIds(this, syncer::ObjectIdSet()); |
+ bridge_->SetHandler(kHandlerName, NULL); |
} |
// SyncNotifierObserver implementation. |
@@ -120,6 +125,7 @@ class ChromeSyncNotificationBridgeTest : public testing::Test { |
} |
virtual void TearDown() OVERRIDE { |
+ bridge_->StopForShutdown(); |
sync_thread_.Stop(); |
// Must be reset only after the sync thread is stopped. |
bridge_.reset(); |