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_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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 | 733 |
734 services->AddService("/service/wimax1", | 734 services->AddService("/service/wimax1", |
735 "wimax1_guid", | 735 "wimax1_guid", |
736 "wimax1" /* name */, | 736 "wimax1" /* name */, |
737 shill::kTypeWimax, | 737 shill::kTypeWimax, |
738 state, | 738 state, |
739 add_to_visible); | 739 add_to_visible); |
740 services->SetServiceProperty("/service/wimax1", | 740 services->SetServiceProperty("/service/wimax1", |
741 shill::kConnectableProperty, | 741 shill::kConnectableProperty, |
742 base::FundamentalValue(true)); | 742 base::FundamentalValue(true)); |
| 743 base::FundamentalValue strength_value(80); |
| 744 services->SetServiceProperty( |
| 745 "/service/wimax1", shill::kSignalStrengthProperty, strength_value); |
| 746 base::StringValue identity_value("test.identity"); |
| 747 services->SetServiceProperty( |
| 748 "/service/wimax1", shill::kEapIdentityProperty, identity_value); |
743 } | 749 } |
744 | 750 |
745 // Cellular | 751 // Cellular |
746 state = GetInitialStateForType(shill::kTypeCellular, &enabled); | 752 state = GetInitialStateForType(shill::kTypeCellular, &enabled); |
747 if (state != kTechnologyUnavailable) { | 753 if (state != kTechnologyUnavailable) { |
748 bool activated = false; | 754 bool activated = false; |
749 if (state == kNetworkActivated) { | 755 if (state == kNetworkActivated) { |
750 activated = true; | 756 activated = true; |
751 state = shill::kStateIdle; | 757 state = shill::kStateIdle; |
752 } | 758 } |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 *enabled = true; | 1118 *enabled = true; |
1113 if ((state == shill::kStatePortal && type != shill::kTypeWifi) || | 1119 if ((state == shill::kStatePortal && type != shill::kTypeWifi) || |
1114 (state == kNetworkActivated && type != shill::kTypeCellular)) { | 1120 (state == kNetworkActivated && type != shill::kTypeCellular)) { |
1115 LOG(WARNING) << "Invalid state: " << state << " for " << type; | 1121 LOG(WARNING) << "Invalid state: " << state << " for " << type; |
1116 return shill::kStateIdle; | 1122 return shill::kStateIdle; |
1117 } | 1123 } |
1118 return state; | 1124 return state; |
1119 } | 1125 } |
1120 | 1126 |
1121 } // namespace chromeos | 1127 } // namespace chromeos |
OLD | NEW |