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

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

Issue 597683005: GCM: D-Bus methods for wake-on-packet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolved DEPS conflict Created 6 years, 2 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
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.h ('k') | chromeos/dbus/mock_shill_manager_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 const ErrorCallback& error_callback) { 348 const ErrorCallback& error_callback) {
349 if (best_service_.empty()) { 349 if (best_service_.empty()) {
350 VLOG(1) << "No 'best' service set."; 350 VLOG(1) << "No 'best' service set.";
351 return; 351 return;
352 } 352 }
353 353
354 DBusThreadManager::Get()->GetShillServiceClient()->Connect( 354 DBusThreadManager::Get()->GetShillServiceClient()->Connect(
355 dbus::ObjectPath(best_service_), callback, error_callback); 355 dbus::ObjectPath(best_service_), callback, error_callback);
356 } 356 }
357 357
358 void FakeShillManagerClient::AddWakeOnPacketConnection(
359 const net::IPEndPoint& ip_endpoint,
360 const base::Closure& callback,
361 const ErrorCallback& error_callback) {
362 }
363
364 void FakeShillManagerClient::RemoveWakeOnPacketConnection(
365 const net::IPEndPoint& ip_endpoint,
366 const base::Closure& callback,
367 const ErrorCallback& error_callback) {
368 }
369
370 void FakeShillManagerClient::RemoveAllWakeOnPacketConnections(
371 const base::Closure& callback,
372 const ErrorCallback& error_callback) {
373 }
374
358 ShillManagerClient::TestInterface* FakeShillManagerClient::GetTestInterface() { 375 ShillManagerClient::TestInterface* FakeShillManagerClient::GetTestInterface() {
359 return this; 376 return this;
360 } 377 }
361 378
362 // ShillManagerClient::TestInterface overrides. 379 // ShillManagerClient::TestInterface overrides.
363 380
364 void FakeShillManagerClient::AddDevice(const std::string& device_path) { 381 void FakeShillManagerClient::AddDevice(const std::string& device_path) {
365 if (GetListProperty(shill::kDevicesProperty) 382 if (GetListProperty(shill::kDevicesProperty)
366 ->AppendIfNotPresent(new base::StringValue(device_path))) { 383 ->AppendIfNotPresent(new base::StringValue(device_path))) {
367 CallNotifyObserversPropertyChanged(shill::kDevicesProperty); 384 CallNotifyObserversPropertyChanged(shill::kDevicesProperty);
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 *enabled = true; 1118 *enabled = true;
1102 if ((state == shill::kStatePortal && type != shill::kTypeWifi) || 1119 if ((state == shill::kStatePortal && type != shill::kTypeWifi) ||
1103 (state == kNetworkActivated && type != shill::kTypeCellular)) { 1120 (state == kNetworkActivated && type != shill::kTypeCellular)) {
1104 LOG(WARNING) << "Invalid state: " << state << " for " << type; 1121 LOG(WARNING) << "Invalid state: " << state << " for " << type;
1105 return shill::kStateIdle; 1122 return shill::kStateIdle;
1106 } 1123 }
1107 return state; 1124 return state;
1108 } 1125 }
1109 1126
1110 } // namespace chromeos 1127 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.h ('k') | chromeos/dbus/mock_shill_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698