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/location.h" | 9 #include "base/location.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 } | 578 } |
579 | 579 |
580 void FakeShillServiceClient::SetCellularActivated( | 580 void FakeShillServiceClient::SetCellularActivated( |
581 const dbus::ObjectPath& service_path, | 581 const dbus::ObjectPath& service_path, |
582 const ErrorCallback& error_callback) { | 582 const ErrorCallback& error_callback) { |
583 SetProperty(service_path, | 583 SetProperty(service_path, |
584 shill::kActivationStateProperty, | 584 shill::kActivationStateProperty, |
585 base::StringValue(shill::kActivationStateActivated), | 585 base::StringValue(shill::kActivationStateActivated), |
586 base::Bind(&base::DoNothing), | 586 base::Bind(&base::DoNothing), |
587 error_callback); | 587 error_callback); |
588 SetProperty(service_path, | 588 SetProperty(service_path, shill::kConnectableProperty, base::Value(true), |
589 shill::kConnectableProperty, | 589 base::Bind(&base::DoNothing), error_callback); |
590 base::FundamentalValue(true), | |
591 base::Bind(&base::DoNothing), | |
592 error_callback); | |
593 } | 590 } |
594 | 591 |
595 void FakeShillServiceClient::ContinueConnect(const std::string& service_path) { | 592 void FakeShillServiceClient::ContinueConnect(const std::string& service_path) { |
596 VLOG(1) << "FakeShillServiceClient::ContinueConnect: " << service_path; | 593 VLOG(1) << "FakeShillServiceClient::ContinueConnect: " << service_path; |
597 base::DictionaryValue* service_properties = NULL; | 594 base::DictionaryValue* service_properties = NULL; |
598 if (!stub_services_.GetDictionary(service_path, &service_properties)) { | 595 if (!stub_services_.GetDictionary(service_path, &service_properties)) { |
599 LOG(ERROR) << "Service not found: " << service_path; | 596 LOG(ERROR) << "Service not found: " << service_path; |
600 return; | 597 return; |
601 } | 598 } |
602 | 599 |
(...skipping 23 matching lines...) Expand all Loading... |
626 base::StringValue(shill::kErrorBadPassphrase))); | 623 base::StringValue(shill::kErrorBadPassphrase))); |
627 } else { | 624 } else { |
628 // Set Online. | 625 // Set Online. |
629 VLOG(1) << "Setting state to Online " << service_path; | 626 VLOG(1) << "Setting state to Online " << service_path; |
630 SetServiceProperty(service_path, shill::kStateProperty, | 627 SetServiceProperty(service_path, shill::kStateProperty, |
631 base::StringValue(shill::kStateOnline)); | 628 base::StringValue(shill::kStateOnline)); |
632 } | 629 } |
633 } | 630 } |
634 | 631 |
635 } // namespace chromeos | 632 } // namespace chromeos |
OLD | NEW |