| Index: components/gcm_driver/gcm_client_impl.cc
|
| diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc
|
| index 2d05aea939a59eda7d7e37e99df7b7e87e3e663a..b7d4a673c12d60316c0e7a9e1f02f09320b956ef 100644
|
| --- a/components/gcm_driver/gcm_client_impl.cc
|
| +++ b/components/gcm_driver/gcm_client_impl.cc
|
| @@ -250,6 +250,7 @@ scoped_ptr<ConnectionFactory> GCMInternalsBuilder::BuildConnectionFactory(
|
| GCMClientImpl::GCMClientImpl(scoped_ptr<GCMInternalsBuilder> internals_builder)
|
| : internals_builder_(internals_builder.Pass()),
|
| state_(UNINITIALIZED),
|
| + delegate_(NULL),
|
| clock_(internals_builder_->BuildClock()),
|
| url_request_context_getter_(NULL),
|
| pending_registration_requests_deleter_(&pending_registration_requests_),
|
| @@ -505,6 +506,7 @@ void GCMClientImpl::UpdateRegistrationCallback(bool success) {
|
| void GCMClientImpl::Stop() {
|
| device_checkin_info_.Reset();
|
| connection_factory_.reset();
|
| + delegate_->OnDisconnected();
|
| mcs_client_.reset();
|
| checkin_request_.reset();
|
| pending_registration_requests_.clear();
|
| @@ -735,13 +737,14 @@ void GCMClientImpl::OnActivityRecorded() {
|
|
|
| void GCMClientImpl::OnConnected(const GURL& current_server,
|
| const net::IPEndPoint& ip_endpoint) {
|
| - // TODO(zea): inform GCMClient::Delegate and app handlers as well.
|
| + // TODO(gcm): expose current server in debug page.
|
| delegate_->OnActivityRecorded();
|
| + delegate_->OnConnected(ip_endpoint);
|
| }
|
|
|
| void GCMClientImpl::OnDisconnected() {
|
| - // TODO(zea): inform GCMClient::Delegate and app handlers as well.
|
| delegate_->OnActivityRecorded();
|
| + delegate_->OnDisconnected();
|
| }
|
|
|
| void GCMClientImpl::OnMessageReceivedFromMCS(const gcm::MCSMessage& message) {
|
|
|