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

Side by Side Diff: chromeos/dbus/fake_shill_manager_client.cc

Issue 409883006: GCM: D-Bus methods for wake-on-packet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: refining based on review comments 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chromeos/dbus/fake_shill_manager_client.h" 5 #include "chromeos/dbus/fake_shill_manager_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 const ErrorCallback& error_callback) { 352 const ErrorCallback& error_callback) {
353 if (best_service_.empty()) { 353 if (best_service_.empty()) {
354 VLOG(1) << "No 'best' service set."; 354 VLOG(1) << "No 'best' service set.";
355 return; 355 return;
356 } 356 }
357 357
358 DBusThreadManager::Get()->GetShillServiceClient()->Connect( 358 DBusThreadManager::Get()->GetShillServiceClient()->Connect(
359 dbus::ObjectPath(best_service_), callback, error_callback); 359 dbus::ObjectPath(best_service_), callback, error_callback);
360 } 360 }
361 361
362 void FakeShillManagerClient::AddWakeOnPacketConnection(
363 const net::IPEndPoint& ip_endpoint,
364 const base::Closure& callback,
365 const ErrorCallback& error_callback) {
366 }
367
368 void FakeShillManagerClient::RemoveWakeOnPacketConnection(
369 const net::IPEndPoint& ip_endpoint,
370 const base::Closure& callback,
371 const ErrorCallback& error_callback) {
372 }
373
374 void FakeShillManagerClient::RemoveAllWakeOnPacketConnections(
375 const base::Closure& callback,
376 const ErrorCallback& error_callback) {
377 }
378
362 ShillManagerClient::TestInterface* FakeShillManagerClient::GetTestInterface() { 379 ShillManagerClient::TestInterface* FakeShillManagerClient::GetTestInterface() {
363 return this; 380 return this;
364 } 381 }
365 382
366 // ShillManagerClient::TestInterface overrides. 383 // ShillManagerClient::TestInterface overrides.
367 384
368 void FakeShillManagerClient::AddDevice(const std::string& device_path) { 385 void FakeShillManagerClient::AddDevice(const std::string& device_path) {
369 if (GetListProperty(shill::kDevicesProperty)->AppendIfNotPresent( 386 if (GetListProperty(shill::kDevicesProperty)->AppendIfNotPresent(
370 base::Value::CreateStringValue(device_path))) { 387 base::Value::CreateStringValue(device_path))) {
371 CallNotifyObserversPropertyChanged(shill::kDevicesProperty); 388 CallNotifyObserversPropertyChanged(shill::kDevicesProperty);
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 *enabled = true; 1031 *enabled = true;
1015 if ((state == shill::kStatePortal && type != shill::kTypeWifi) || 1032 if ((state == shill::kStatePortal && type != shill::kTypeWifi) ||
1016 (state == kNetworkActivated && type != shill::kTypeCellular)) { 1033 (state == kNetworkActivated && type != shill::kTypeCellular)) {
1017 LOG(WARNING) << "Invalid state: " << state << " for " << type; 1034 LOG(WARNING) << "Invalid state: " << state << " for " << type;
1018 return shill::kStateIdle; 1035 return shill::kStateIdle;
1019 } 1036 }
1020 return state; 1037 return state;
1021 } 1038 }
1022 1039
1023 } // namespace chromeos 1040 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698