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

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

Issue 156353002: Implement networkingPrivate.setWifiTDLSEnabledState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable TDLS tests on non-chromeos Created 6 years, 10 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
« no previous file with comments | « chromeos/dbus/fake_shill_device_client.cc ('k') | chromeos/dbus/shill_device_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/values.h" 10 #include "base/values.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 void FakeShillManagerClient::NotifyObserversPropertyChanged( 529 void FakeShillManagerClient::NotifyObserversPropertyChanged(
530 const std::string& property) { 530 const std::string& property) {
531 if (property == shill::kServicesProperty || 531 if (property == shill::kServicesProperty ||
532 property == shill::kServiceWatchListProperty) { 532 property == shill::kServiceWatchListProperty) {
533 scoped_ptr<base::ListValue> services(GetEnabledServiceList(property)); 533 scoped_ptr<base::ListValue> services(GetEnabledServiceList(property));
534 FOR_EACH_OBSERVER(ShillPropertyChangedObserver, 534 FOR_EACH_OBSERVER(ShillPropertyChangedObserver,
535 observer_list_, 535 observer_list_,
536 OnPropertyChanged(property, *(services.get()))); 536 OnPropertyChanged(property, *(services.get())));
537 return; 537 return;
538 } 538 }
539 if (property == shill::kDevicesProperty) {
540 base::ListValue* devices = NULL;
541 if (stub_properties_.GetListWithoutPathExpansion(
542 shill::kDevicesProperty, &devices)) {
543 FOR_EACH_OBSERVER(ShillPropertyChangedObserver,
544 observer_list_,
545 OnPropertyChanged(property, *devices));
546 }
547 return;
548 }
539 base::Value* value = NULL; 549 base::Value* value = NULL;
540 if (!stub_properties_.GetWithoutPathExpansion(property, &value)) { 550 if (!stub_properties_.GetWithoutPathExpansion(property, &value)) {
541 LOG(ERROR) << "Notify for unknown property: " << property; 551 LOG(ERROR) << "Notify for unknown property: " << property;
542 return; 552 return;
543 } 553 }
544 FOR_EACH_OBSERVER(ShillPropertyChangedObserver, 554 FOR_EACH_OBSERVER(ShillPropertyChangedObserver,
545 observer_list_, 555 observer_list_,
546 OnPropertyChanged(property, *value)); 556 OnPropertyChanged(property, *value));
547 } 557 }
548 558
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 SetDeviceProperty(device_path, 637 SetDeviceProperty(device_path,
628 shill::kScanningProperty, 638 shill::kScanningProperty,
629 base::FundamentalValue(false)); 639 base::FundamentalValue(false));
630 } 640 }
631 CallNotifyObserversPropertyChanged(shill::kServicesProperty, 0); 641 CallNotifyObserversPropertyChanged(shill::kServicesProperty, 0);
632 CallNotifyObserversPropertyChanged(shill::kServiceWatchListProperty, 0); 642 CallNotifyObserversPropertyChanged(shill::kServiceWatchListProperty, 0);
633 base::MessageLoop::current()->PostTask(FROM_HERE, callback); 643 base::MessageLoop::current()->PostTask(FROM_HERE, callback);
634 } 644 }
635 645
636 } // namespace chromeos 646 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_shill_device_client.cc ('k') | chromeos/dbus/shill_device_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698