| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/shill_manager_client_stub.h" | 5 #include "chromeos/dbus/shill_manager_client_stub.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/chromeos/chromeos_version.h" | 8 #include "base/chromeos/chromeos_version.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 &ShillManagerClientStub::PassStubGeoNetworks, | 81 &ShillManagerClientStub::PassStubGeoNetworks, |
| 82 weak_ptr_factory_.GetWeakPtr(), | 82 weak_ptr_factory_.GetWeakPtr(), |
| 83 callback)); | 83 callback)); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void ShillManagerClientStub::SetProperty(const std::string& name, | 86 void ShillManagerClientStub::SetProperty(const std::string& name, |
| 87 const base::Value& value, | 87 const base::Value& value, |
| 88 const base::Closure& callback, | 88 const base::Closure& callback, |
| 89 const ErrorCallback& error_callback) { | 89 const ErrorCallback& error_callback) { |
| 90 stub_properties_.SetWithoutPathExpansion(name, value.DeepCopy()); | 90 stub_properties_.SetWithoutPathExpansion(name, value.DeepCopy()); |
| 91 CallNotifyObserversPropertyChanged(name, 0); |
| 91 if (callback.is_null()) | 92 if (callback.is_null()) |
| 92 return; | 93 return; |
| 93 MessageLoop::current()->PostTask(FROM_HERE, callback); | 94 MessageLoop::current()->PostTask(FROM_HERE, callback); |
| 94 } | 95 } |
| 95 | 96 |
| 96 void ShillManagerClientStub::RequestScan(const std::string& type, | 97 void ShillManagerClientStub::RequestScan(const std::string& type, |
| 97 const base::Closure& callback, | 98 const base::Closure& callback, |
| 98 const ErrorCallback& error_callback) { | 99 const ErrorCallback& error_callback) { |
| 99 // For Stub purposes, default to a Wifi scan. | 100 // For Stub purposes, default to a Wifi scan. |
| 100 std::string device_type = flimflam::kTypeWifi; | 101 std::string device_type = flimflam::kTypeWifi; |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 base::FundamentalValue(false)); | 607 base::FundamentalValue(false)); |
| 607 } | 608 } |
| 608 CallNotifyObserversPropertyChanged(flimflam::kServicesProperty, 0); | 609 CallNotifyObserversPropertyChanged(flimflam::kServicesProperty, 0); |
| 609 CallNotifyObserversPropertyChanged(flimflam::kServiceWatchListProperty, | 610 CallNotifyObserversPropertyChanged(flimflam::kServiceWatchListProperty, |
| 610 0); | 611 0); |
| 611 if (!callback.is_null()) | 612 if (!callback.is_null()) |
| 612 MessageLoop::current()->PostTask(FROM_HERE, callback); | 613 MessageLoop::current()->PostTask(FROM_HERE, callback); |
| 613 } | 614 } |
| 614 | 615 |
| 615 } // namespace chromeos | 616 } // namespace chromeos |
| OLD | NEW |