OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h" |
6 | 6 |
7 #include <ctype.h> | 7 #include <ctype.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 const base::ListValue* args) { | 1144 const base::ListValue* args) { |
1145 std::string service_path, auto_connect_str; | 1145 std::string service_path, auto_connect_str; |
1146 if (args->GetSize() < 2 || | 1146 if (args->GetSize() < 2 || |
1147 !args->GetString(0, &service_path) || | 1147 !args->GetString(0, &service_path) || |
1148 !args->GetString(1, &auto_connect_str)) { | 1148 !args->GetString(1, &auto_connect_str)) { |
1149 NOTREACHED(); | 1149 NOTREACHED(); |
1150 return; | 1150 return; |
1151 } | 1151 } |
1152 content::RecordAction(base::UserMetricsAction("Options_NetworkAutoConnect")); | 1152 content::RecordAction(base::UserMetricsAction("Options_NetworkAutoConnect")); |
1153 bool auto_connect = auto_connect_str == kTagTrue; | 1153 bool auto_connect = auto_connect_str == kTagTrue; |
1154 SetNetworkProperty(service_path, shill::kAutoConnectProperty, | 1154 SetNetworkProperty(service_path, |
1155 base::Value::CreateBooleanValue(auto_connect)); | 1155 shill::kAutoConnectProperty, |
| 1156 new base::FundamentalValue(auto_connect)); |
1156 } | 1157 } |
1157 | 1158 |
1158 void InternetOptionsHandler::SetIPConfigCallback(const base::ListValue* args) { | 1159 void InternetOptionsHandler::SetIPConfigCallback(const base::ListValue* args) { |
1159 std::string service_path; | 1160 std::string service_path; |
1160 if (!args->GetString(0, &service_path)) { | 1161 if (!args->GetString(0, &service_path)) { |
1161 NOTREACHED(); | 1162 NOTREACHED(); |
1162 return; | 1163 return; |
1163 } | 1164 } |
1164 NetworkHandler::Get()->network_configuration_handler()->GetProperties( | 1165 NetworkHandler::Get()->network_configuration_handler()->GetProperties( |
1165 service_path, | 1166 service_path, |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1566 dictionary->SetBoolean( | 1567 dictionary->SetBoolean( |
1567 kTagWimaxAvailable, | 1568 kTagWimaxAvailable, |
1568 handler->IsTechnologyAvailable(NetworkTypePattern::Wimax())); | 1569 handler->IsTechnologyAvailable(NetworkTypePattern::Wimax())); |
1569 dictionary->SetBoolean( | 1570 dictionary->SetBoolean( |
1570 kTagWimaxEnabled, | 1571 kTagWimaxEnabled, |
1571 handler->IsTechnologyEnabled(NetworkTypePattern::Wimax())); | 1572 handler->IsTechnologyEnabled(NetworkTypePattern::Wimax())); |
1572 } | 1573 } |
1573 | 1574 |
1574 } // namespace options | 1575 } // namespace options |
1575 } // namespace chromeos | 1576 } // namespace chromeos |
OLD | NEW |