Index: chrome/browser/services/gcm/chromeos_gcm_app_handler.cc |
diff --git a/chrome/browser/services/gcm/chromeos_gcm_app_handler.cc b/chrome/browser/services/gcm/chromeos_gcm_app_handler.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8177071548607b8986bbe306072336af2fc241e1 |
--- /dev/null |
+++ b/chrome/browser/services/gcm/chromeos_gcm_app_handler.cc |
@@ -0,0 +1,40 @@ |
+// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chrome/browser/services/gcm/chromeos_gcm_app_handler.h" |
+ |
+#include "base/callback.h" |
+#include "base/logging.h" |
+#include "chromeos/dbus/dbus_thread_manager.h" |
+#include "chromeos/dbus/shill_manager_client.h" |
+ |
+namespace gcm { |
+ |
+ChromeOSGCMAppHandler::ChromeOSGCMAppHandler() { |
+} |
+ |
+ChromeOSGCMAppHandler::~ChromeOSGCMAppHandler() { |
+} |
+ |
+// static |
+void ChromeOSGCMAppHandler::ErrorCallback( |
+ const std::string& error_name, |
+ const std::string& error) { |
+ LOG(ERROR) << "GCM D-Bus method error " << error_name << ": " << error; |
+} |
+ |
+void ChromeOSGCMAppHandler::OnConnected(const net::IPEndPoint& ip_endpoint) { |
+ const std::string ip_endpoint_string = ip_endpoint.ToString(); |
+ chromeos::DBusThreadManager::Get()-> |
+ GetShillManagerClient()-> |
Daniel Erat
2014/08/21 22:17:37
nit: indent this four spaces beyond the previous l
Luigi Semenzato
2014/08/22 01:08:19
Done.
|
+ AddWakeOnPacketConnection( |
+ ip_endpoint_string, |
Daniel Erat
2014/08/21 22:17:37
nit: indent four spaces, not two
Luigi Semenzato
2014/08/22 01:08:19
Done.
|
+ base::Bind(&base::DoNothing), |
+ base::Bind(&ChromeOSGCMAppHandler::ErrorCallback)); |
+} |
+ |
+void ChromeOSGCMAppHandler::OnDisconnected() { |
+} |
+ |
+} // namespace gcm |