OLD | NEW |
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_service_client.h" | 5 #include "chromeos/dbus/fake_shill_service_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 SortManagerServices(); | 383 SortManagerServices(); |
384 | 384 |
385 if (!profile_path.empty()) { | 385 if (!profile_path.empty()) { |
386 DBusThreadManager::Get()->GetShillProfileClient()->GetTestInterface()-> | 386 DBusThreadManager::Get()->GetShillProfileClient()->GetTestInterface()-> |
387 UpdateService(profile_path, service_path); | 387 UpdateService(profile_path, service_path); |
388 } | 388 } |
389 } | 389 } |
390 | 390 |
391 void FakeShillServiceClient::RemoveService(const std::string& service_path) { | 391 void FakeShillServiceClient::RemoveService(const std::string& service_path) { |
392 DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()-> | 392 DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()-> |
393 RemoveManagerService(service_path); | 393 RemoveManagerService(service_path, true); |
394 | 394 |
395 stub_services_.RemoveWithoutPathExpansion(service_path, NULL); | 395 stub_services_.RemoveWithoutPathExpansion(service_path, NULL); |
396 connect_behavior_.erase(service_path); | 396 connect_behavior_.erase(service_path); |
397 } | 397 } |
398 | 398 |
399 bool FakeShillServiceClient::SetServiceProperty(const std::string& service_path, | 399 bool FakeShillServiceClient::SetServiceProperty(const std::string& service_path, |
400 const std::string& property, | 400 const std::string& property, |
401 const base::Value& value) { | 401 const base::Value& value) { |
402 base::DictionaryValue* dict = NULL; | 402 base::DictionaryValue* dict = NULL; |
403 if (!stub_services_.GetDictionaryWithoutPathExpansion(service_path, &dict)) | 403 if (!stub_services_.GetDictionaryWithoutPathExpansion(service_path, &dict)) |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 base::StringValue(shill::kErrorBadPassphrase))); | 610 base::StringValue(shill::kErrorBadPassphrase))); |
611 } else { | 611 } else { |
612 // Set Online. | 612 // Set Online. |
613 SetServiceProperty(service_path, | 613 SetServiceProperty(service_path, |
614 shill::kStateProperty, | 614 shill::kStateProperty, |
615 base::StringValue(shill::kStateOnline)); | 615 base::StringValue(shill::kStateOnline)); |
616 } | 616 } |
617 } | 617 } |
618 | 618 |
619 } // namespace chromeos | 619 } // namespace chromeos |
OLD | NEW |