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

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

Issue 561073002: Use ONC carrier info in JS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_279351_internet_options_10a
Patch Set: Rebase Created 6 years, 3 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
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 "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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 if (state == kNetworkActivated) { 732 if (state == kNetworkActivated) {
733 activated = true; 733 activated = true;
734 state = shill::kStateIdle; 734 state = shill::kStateIdle;
735 } 735 }
736 AddTechnology(shill::kTypeCellular, enabled); 736 AddTechnology(shill::kTypeCellular, enabled);
737 devices->AddDevice( 737 devices->AddDevice(
738 "/device/cellular1", shill::kTypeCellular, "stub_cellular_device1"); 738 "/device/cellular1", shill::kTypeCellular, "stub_cellular_device1");
739 devices->SetDeviceProperty("/device/cellular1", 739 devices->SetDeviceProperty("/device/cellular1",
740 shill::kCarrierProperty, 740 shill::kCarrierProperty,
741 base::StringValue(shill::kCarrierSprint)); 741 base::StringValue(shill::kCarrierSprint));
742 base::ListValue carrier_list;
743 carrier_list.AppendString(shill::kCarrierSprint);
744 carrier_list.AppendString(shill::kCarrierGenericUMTS);
745 devices->SetDeviceProperty("/device/cellular1",
746 shill::kSupportedCarriersProperty,
747 carrier_list);
742 748
743 services->AddService(kCellularServicePath, 749 services->AddService(kCellularServicePath,
744 "cellular1_guid", 750 "cellular1_guid",
745 "cellular1" /* name */, 751 "cellular1" /* name */,
746 shill::kTypeCellular, 752 shill::kTypeCellular,
747 state, 753 state,
748 add_to_visible); 754 add_to_visible);
749 base::StringValue technology_value(shill::kNetworkTechnologyGsm); 755 base::StringValue technology_value(shill::kNetworkTechnologyGsm);
750 services->SetServiceProperty(kCellularServicePath, 756 services->SetServiceProperty(kCellularServicePath,
751 shill::kNetworkTechnologyProperty, 757 shill::kNetworkTechnologyProperty,
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 *enabled = true; 1095 *enabled = true;
1090 if ((state == shill::kStatePortal && type != shill::kTypeWifi) || 1096 if ((state == shill::kStatePortal && type != shill::kTypeWifi) ||
1091 (state == kNetworkActivated && type != shill::kTypeCellular)) { 1097 (state == kNetworkActivated && type != shill::kTypeCellular)) {
1092 LOG(WARNING) << "Invalid state: " << state << " for " << type; 1098 LOG(WARNING) << "Invalid state: " << state << " for " << type;
1093 return shill::kStateIdle; 1099 return shill::kStateIdle;
1094 } 1100 }
1095 return state; 1101 return state;
1096 } 1102 }
1097 1103
1098 } // namespace chromeos 1104 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698