Chromium Code Reviews| 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 542d731c29a6ef7397f6efd315583aae003d9cdf..0caf35c861ee2087121a06efbfdce4a8e17449e2 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. |
|
akalin
2012/09/17 23:20:14
this comment doesn't say much, either. I think yo
|
| +void ProfileSyncService::SendInvalidationForTest( |
| + const invalidation::ObjectId& id, |
| + const std::string& payload) { |
| + // insert the object into the list of IDs to notify |
|
akalin
2012/09/17 23:20:14
this comment doesn't say much
|
| + syncer::ObjectIdSet notify_ids; |
| + notify_ids.insert(id); |
| + |
| + // Build an object state map, and use it to forward the call to |
|
akalin
2012/09/17 23:20:14
i don't know if this says muchmore, either
|
| + // 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); |
| } |