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

Side by Side Diff: components/gcm_driver/default_gcm_app_handler.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/gcm_driver/default_gcm_app_handler.h" 5 #include "components/gcm_driver/default_gcm_app_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/base/ip_endpoint.h"
8 9
9 namespace gcm { 10 namespace gcm {
10 11
11 DefaultGCMAppHandler::DefaultGCMAppHandler() { 12 DefaultGCMAppHandler::DefaultGCMAppHandler() {
12 } 13 }
13 14
14 DefaultGCMAppHandler::~DefaultGCMAppHandler() { 15 DefaultGCMAppHandler::~DefaultGCMAppHandler() {
15 } 16 }
16 17
17 void DefaultGCMAppHandler::ShutdownHandler() { 18 void DefaultGCMAppHandler::ShutdownHandler() {
(...skipping 11 matching lines...) Expand all
29 << app_id; 30 << app_id;
30 } 31 }
31 32
32 void DefaultGCMAppHandler::OnSendError( 33 void DefaultGCMAppHandler::OnSendError(
33 const std::string& app_id, 34 const std::string& app_id,
34 const GCMClient::SendErrorDetails& send_error_details) { 35 const GCMClient::SendErrorDetails& send_error_details) {
35 LOG(ERROR) << "No app handler is found to route send error message for " 36 LOG(ERROR) << "No app handler is found to route send error message for "
36 << app_id; 37 << app_id;
37 } 38 }
38 39
40 void DefaultGCMAppHandler::OnConnected(const net::IPEndPoint& ip_endpoint) {
41 // TODO(semenzato): update CrOS NIC state.
42 DVLOG(1) << "GCM connected to " << ip_endpoint.ToString();
43 }
44
45 void DefaultGCMAppHandler::OnDisconnected() {
46 // TODO(semenzato): update CrOS NIC state.
47 DVLOG(1) << "GCM disconnected";
48 }
49
39 } // namespace gcm 50 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/default_gcm_app_handler.h ('k') | components/gcm_driver/fake_gcm_app_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698