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

Unified Diff: chrome/browser/services/gcm/fake_gcm_profile_service.cc

Issue 2578583002: Provide a mechanism for the GCM driver to send message receipts to GCM.
Patch Set: Adding new file I missed previously. Created 3 years, 11 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/services/gcm/fake_gcm_profile_service.cc
diff --git a/chrome/browser/services/gcm/fake_gcm_profile_service.cc b/chrome/browser/services/gcm/fake_gcm_profile_service.cc
index 185d824581661bc54970e6cec80422f3d0e95f45..cd1c1a8a3fefcedf08b56421e4197a1384ff627e 100644
--- a/chrome/browser/services/gcm/fake_gcm_profile_service.cc
+++ b/chrome/browser/services/gcm/fake_gcm_profile_service.cc
@@ -38,7 +38,8 @@ class CustomFakeGCMDriver : public instance_id::FakeGCMDriverForInstanceID {
GCMClient::Result result);
void OnDispatchMessage(const std::string& app_id,
- const IncomingMessage& message);
+ const IncomingMessage& message,
+ const GCMClient::MessageReceiptCallback& callback);
protected:
// FakeGCMDriverForInstanceID overrides:
@@ -110,9 +111,11 @@ void CustomFakeGCMDriver::OnSendFinished(const std::string& app_id,
SendFinished(app_id, message_id, result);
}
-void CustomFakeGCMDriver::OnDispatchMessage(const std::string& app_id,
- const IncomingMessage& message) {
- DispatchMessage(app_id, message);
+void CustomFakeGCMDriver::OnDispatchMessage(
+ const std::string& app_id,
+ const IncomingMessage& message,
+ const GCMClient::MessageReceiptCallback& callback) {
+ DispatchMessage(app_id, message, callback);
}
} // namespace
@@ -194,11 +197,13 @@ void FakeGCMProfileService::SetUnregisterCallback(
unregister_callback_ = callback;
}
-void FakeGCMProfileService::DispatchMessage(const std::string& app_id,
- const IncomingMessage& message) {
+void FakeGCMProfileService::DispatchMessage(
+ const std::string& app_id,
+ const IncomingMessage& message,
+ const GCMClient::MessageReceiptCallback& callback) {
CustomFakeGCMDriver* custom_driver =
static_cast<CustomFakeGCMDriver*>(driver());
- custom_driver->OnDispatchMessage(app_id, message);
+ custom_driver->OnDispatchMessage(app_id, message, callback);
}
} // namespace gcm

Powered by Google App Engine
This is Rietveld 408576698