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

Unified Diff: components/gcm_driver/fake_gcm_app_handler.cc

Issue 442123003: [GCM] Adding the OnSendAcknowledgement event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing code review comments. Created 6 years, 4 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
« no previous file with comments | « components/gcm_driver/fake_gcm_app_handler.h ('k') | components/gcm_driver/fake_gcm_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/fake_gcm_app_handler.cc
diff --git a/components/gcm_driver/fake_gcm_app_handler.cc b/components/gcm_driver/fake_gcm_app_handler.cc
index a2ccbb08d3b433b95de0e67346d5684234030cb2..40258eb47bc59280f6d724d4d30f465c35aedb0c 100644
--- a/components/gcm_driver/fake_gcm_app_handler.cc
+++ b/components/gcm_driver/fake_gcm_app_handler.cc
@@ -53,9 +53,20 @@ void FakeGCMAppHandler::OnSendError(
run_loop_->Quit();
}
+void FakeGCMAppHandler::OnSendAcknowledged(
+ const std::string& app_id,
+ const std::string& message_id) {
+ ClearResults();
+ app_id_ = app_id;
+ acked_message_id_ = message_id;
+ if (run_loop_)
+ run_loop_->Quit();
+}
+
void FakeGCMAppHandler::ClearResults() {
received_event_ = NO_EVENT;
app_id_.clear();
+ acked_message_id_.clear();
message_ = GCMClient::IncomingMessage();
send_error_details_ = GCMClient::SendErrorDetails();
}
« no previous file with comments | « components/gcm_driver/fake_gcm_app_handler.h ('k') | components/gcm_driver/fake_gcm_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698