OLD | NEW |
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 #include "net/base/ip_endpoint.h" |
9 | 9 |
10 namespace gcm { | 10 namespace gcm { |
11 | 11 |
12 DefaultGCMAppHandler::DefaultGCMAppHandler() { | 12 DefaultGCMAppHandler::DefaultGCMAppHandler() { |
13 } | 13 } |
14 | 14 |
15 DefaultGCMAppHandler::~DefaultGCMAppHandler() { | 15 DefaultGCMAppHandler::~DefaultGCMAppHandler() { |
16 } | 16 } |
17 | 17 |
18 void DefaultGCMAppHandler::ShutdownHandler() { | 18 void DefaultGCMAppHandler::ShutdownHandler() { |
19 // Nothing to do. | 19 // Nothing to do. |
20 } | 20 } |
21 | 21 |
22 void DefaultGCMAppHandler::OnMessage( | 22 void DefaultGCMAppHandler::OnMessage( |
23 const std::string& app_id, | 23 const std::string& app_id, |
24 const GCMClient::IncomingMessage& message) { | 24 const GCMClient::IncomingMessage& message) { |
25 LOG(ERROR) << "No app handler is found to route message for " << app_id; | 25 DVLOG(1) << "No app handler is found to route message for " << app_id; |
26 } | 26 } |
27 | 27 |
28 void DefaultGCMAppHandler::OnMessagesDeleted(const std::string& app_id) { | 28 void DefaultGCMAppHandler::OnMessagesDeleted(const std::string& app_id) { |
29 LOG(ERROR) << "No app handler is found to route deleted message for " | 29 DVLOG(1) << "No app handler is found to route deleted message for " << app_id; |
30 << app_id; | |
31 } | 30 } |
32 | 31 |
33 void DefaultGCMAppHandler::OnSendError( | 32 void DefaultGCMAppHandler::OnSendError( |
34 const std::string& app_id, | 33 const std::string& app_id, |
35 const GCMClient::SendErrorDetails& send_error_details) { | 34 const GCMClient::SendErrorDetails& send_error_details) { |
36 LOG(ERROR) << "No app handler is found to route send error message for " | 35 DVLOG(1) << "No app handler is found to route send error message for " |
37 << app_id; | 36 << app_id; |
| 37 } |
| 38 |
| 39 void DefaultGCMAppHandler::OnSendAcknowledged(const std::string& app_id, |
| 40 const std::string& message_id) { |
| 41 DVLOG(1) << "No app handler is found to route send acknoledgement for " |
| 42 << app_id; |
38 } | 43 } |
39 | 44 |
40 void DefaultGCMAppHandler::OnConnected(const net::IPEndPoint& ip_endpoint) { | 45 void DefaultGCMAppHandler::OnConnected(const net::IPEndPoint& ip_endpoint) { |
41 // TODO(semenzato): update CrOS NIC state. | 46 // TODO(semenzato): update CrOS NIC state. |
42 DVLOG(1) << "GCM connected to " << ip_endpoint.ToString(); | 47 DVLOG(1) << "GCM connected to " << ip_endpoint.ToString(); |
43 } | 48 } |
44 | 49 |
45 void DefaultGCMAppHandler::OnDisconnected() { | 50 void DefaultGCMAppHandler::OnDisconnected() { |
46 // TODO(semenzato): update CrOS NIC state. | 51 // TODO(semenzato): update CrOS NIC state. |
47 DVLOG(1) << "GCM disconnected"; | 52 DVLOG(1) << "GCM disconnected"; |
48 } | 53 } |
49 | 54 |
50 } // namespace gcm | 55 } // namespace gcm |
OLD | NEW |