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

Side by Side Diff: chrome/browser/services/gcm/chromeos_gcm_app_handler.cc

Issue 409883006: GCM: D-Bus methods for wake-on-packet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move chromeos-specific code to gcm profile creation Created 6 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/services/gcm/chromeos_gcm_app_handler.h"
6
7 #include "base/callback.h"
8 #include "base/logging.h"
9 #include "chromeos/dbus/dbus_thread_manager.h"
10 #include "chromeos/dbus/shill_manager_client.h"
11
12 namespace gcm {
13
14 ChromeOSGCMAppHandler::ChromeOSGCMAppHandler() {
15 }
16
17 ChromeOSGCMAppHandler::~ChromeOSGCMAppHandler() {
18 }
19
20 // static
21 void ChromeOSGCMAppHandler::ErrorCallback(
22 const std::string& error_name,
23 const std::string& error) {
24 LOG(ERROR) << "GCM D-Bus method error " << error_name << ": " << error;
25 }
26
27 void ChromeOSGCMAppHandler::OnConnected(const net::IPEndPoint& ip_endpoint) {
28 const std::string ip_endpoint_string = ip_endpoint.ToString();
29 chromeos::DBusThreadManager::Get()->
30 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.
31 AddWakeOnPacketConnection(
32 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.
33 base::Bind(&base::DoNothing),
34 base::Bind(&ChromeOSGCMAppHandler::ErrorCallback));
35 }
36
37 void ChromeOSGCMAppHandler::OnDisconnected() {
38 }
39
40 } // namespace gcm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698