Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2378)

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 10915216: Browser test for the push messaging feature (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Change name of obj_id variable Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
« chrome/browser/sync/profile_sync_service.h ('K') | « chrome/browser/sync/profile_sync_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698