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

Unified Diff: components/gcm_driver/fake_gcm_client.cc

Issue 320993003: [GCM] Add app handler support for connection events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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.cc ('k') | components/gcm_driver/fake_gcm_driver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/fake_gcm_client.cc
diff --git a/components/gcm_driver/fake_gcm_client.cc b/components/gcm_driver/fake_gcm_client.cc
index 989812441e961226c50ff5c0cde27f45ee972deb..6cfeb20a19a170785631c5036ad1f93f0c5abb66 100644
--- a/components/gcm_driver/fake_gcm_client.cc
+++ b/components/gcm_driver/fake_gcm_client.cc
@@ -11,6 +11,7 @@
#include "base/sys_byteorder.h"
#include "base/time/time.h"
#include "google_apis/gcm/base/encryptor.h"
+#include "net/base/ip_endpoint.h"
namespace gcm {
@@ -61,6 +62,7 @@ void FakeGCMClient::DoLoading() {
void FakeGCMClient::Stop() {
DCHECK(io_thread_->RunsTasksOnCurrentThread());
status_ = STOPPED;
+ delegate_->OnDisconnected();
}
void FakeGCMClient::CheckOut() {
@@ -168,6 +170,7 @@ std::string FakeGCMClient::GetRegistrationIdFromSenderIds(
void FakeGCMClient::CheckinFinished() {
delegate_->OnGCMReady();
+ delegate_->OnConnected(net::IPEndPoint());
}
void FakeGCMClient::RegisterFinished(const std::string& app_id,
« no previous file with comments | « components/gcm_driver/fake_gcm_app_handler.cc ('k') | components/gcm_driver/fake_gcm_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698