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

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

Issue 2956433003: Settings: Network: Support choose mobile network (Closed)
Patch Set: Rebase Created 3 years, 5 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
« no previous file with comments | « chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc ('k') | no next file » | 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 devices->AddDevice( 791 devices->AddDevice(
792 "/device/cellular1", shill::kTypeCellular, "stub_cellular_device1"); 792 "/device/cellular1", shill::kTypeCellular, "stub_cellular_device1");
793 devices->SetDeviceProperty("/device/cellular1", shill::kCarrierProperty, 793 devices->SetDeviceProperty("/device/cellular1", shill::kCarrierProperty,
794 base::Value(shill::kCarrierSprint)); 794 base::Value(shill::kCarrierSprint));
795 base::ListValue carrier_list; 795 base::ListValue carrier_list;
796 carrier_list.AppendString(shill::kCarrierSprint); 796 carrier_list.AppendString(shill::kCarrierSprint);
797 carrier_list.AppendString(shill::kCarrierGenericUMTS); 797 carrier_list.AppendString(shill::kCarrierGenericUMTS);
798 devices->SetDeviceProperty("/device/cellular1", 798 devices->SetDeviceProperty("/device/cellular1",
799 shill::kSupportedCarriersProperty, 799 shill::kSupportedCarriersProperty,
800 carrier_list); 800 carrier_list);
801 devices->SetDeviceProperty("/device/cellular1",
802 shill::kSupportNetworkScanProperty,
803 base::Value(true));
804 if (roaming_state_ == kRoamingRequired) { 801 if (roaming_state_ == kRoamingRequired) {
805 devices->SetDeviceProperty("/device/cellular1", 802 devices->SetDeviceProperty("/device/cellular1",
806 shill::kProviderRequiresRoamingProperty, 803 shill::kProviderRequiresRoamingProperty,
807 base::Value(true)); 804 base::Value(true));
808 } 805 }
809 if (cellular_technology_ == shill::kNetworkTechnologyGsm) { 806 if (cellular_technology_ == shill::kNetworkTechnologyGsm) {
810 devices->SetDeviceProperty("/device/cellular1", 807 devices->SetDeviceProperty("/device/cellular1",
808 shill::kSupportNetworkScanProperty,
809 base::Value(true));
810 devices->SetDeviceProperty("/device/cellular1",
811 shill::kSIMPresentProperty, base::Value(true)); 811 shill::kSIMPresentProperty, base::Value(true));
812 devices->SetSimLocked("/device/cellular1", false); 812 devices->SetSimLocked("/device/cellular1", false);
813 } 813 }
814 814
815 services->AddService(kCellularServicePath, 815 services->AddService(kCellularServicePath,
816 "cellular1_guid", 816 "cellular1_guid",
817 "cellular1" /* name */, 817 "cellular1" /* name */,
818 shill::kTypeCellular, 818 shill::kTypeCellular,
819 state, 819 state,
820 add_to_visible); 820 add_to_visible);
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 LOG(WARNING) << "Invalid state: " << state << " for " << type; 1228 LOG(WARNING) << "Invalid state: " << state << " for " << type;
1229 result = shill::kStateIdle; 1229 result = shill::kStateIdle;
1230 } 1230 }
1231 } 1231 }
1232 VLOG(1) << "Initial state for: " << type << " = " << result 1232 VLOG(1) << "Initial state for: " << type << " = " << result
1233 << " Enabled: " << *enabled; 1233 << " Enabled: " << *enabled;
1234 return result; 1234 return result;
1235 } 1235 }
1236 1236
1237 } // namespace chromeos 1237 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698