| Index: chrome/browser/sync/profile_sync_service.cc
|
| diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
|
| index 366026f19d0ee7d468d93903afe21b9b920ee832..516c1f33a483693dceebfdae8b199370a4429dee 100644
|
| --- a/chrome/browser/sync/profile_sync_service.cc
|
| +++ b/chrome/browser/sync/profile_sync_service.cc
|
| @@ -472,6 +472,22 @@ syncer::InvalidatorState ProfileSyncService::GetInvalidatorState() const {
|
| return invalidator_registrar_.GetInvalidatorState();
|
| }
|
|
|
| +// Test method for system test to allow a test to send in an invalidation.
|
| +void ProfileSyncService::SendInvalidationForTest(
|
| + const invalidation::ObjectId objId,
|
| + const std::string& payload) {
|
| + // insert the object into the list of IDs to notify
|
| + syncer::ObjectIdSet notify_ids;
|
| + notify_ids.insert(objId);
|
| +
|
| + // Build an object state map, and use it to forward the call to
|
| + // registered clients such as PushMessagingHandler::OnIncomingNotification
|
| + // as if this came from the server.
|
| + const syncer::ObjectIdStateMap& id_state_map =
|
| + ObjectIdSetToStateMap(notify_ids, payload);
|
| + OnIncomingInvalidation(id_state_map, syncer::REMOTE_INVALIDATION);
|
| +}
|
| +
|
| void ProfileSyncService::Shutdown() {
|
| ShutdownImpl(false);
|
| }
|
|
|