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 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 | 1327 |
1328 void InternetOptionsHandler::SetServerHostnameCallback( | 1328 void InternetOptionsHandler::SetServerHostnameCallback( |
1329 const base::ListValue* args) { | 1329 const base::ListValue* args) { |
1330 std::string service_path, server_hostname; | 1330 std::string service_path, server_hostname; |
1331 if (args->GetSize() < 2 || | 1331 if (args->GetSize() < 2 || |
1332 !args->GetString(0, &service_path) || | 1332 !args->GetString(0, &service_path) || |
1333 !args->GetString(1, &server_hostname)) { | 1333 !args->GetString(1, &server_hostname)) { |
1334 NOTREACHED(); | 1334 NOTREACHED(); |
1335 return; | 1335 return; |
1336 } | 1336 } |
1337 SetNetworkProperty(service_path, shill::kProviderHostProperty, | 1337 SetNetworkProperty(service_path, |
1338 base::Value::CreateStringValue(server_hostname)); | 1338 shill::kProviderHostProperty, |
| 1339 new base::StringValue(server_hostname)); |
1339 } | 1340 } |
1340 | 1341 |
1341 void InternetOptionsHandler::SetPreferNetworkCallback( | 1342 void InternetOptionsHandler::SetPreferNetworkCallback( |
1342 const base::ListValue* args) { | 1343 const base::ListValue* args) { |
1343 std::string service_path, prefer_network_str; | 1344 std::string service_path, prefer_network_str; |
1344 if (args->GetSize() < 2 || | 1345 if (args->GetSize() < 2 || |
1345 !args->GetString(0, &service_path) || | 1346 !args->GetString(0, &service_path) || |
1346 !args->GetString(1, &prefer_network_str)) { | 1347 !args->GetString(1, &prefer_network_str)) { |
1347 NOTREACHED(); | 1348 NOTREACHED(); |
1348 return; | 1349 return; |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1795 dictionary->SetBoolean( | 1796 dictionary->SetBoolean( |
1796 kTagWimaxAvailable, | 1797 kTagWimaxAvailable, |
1797 handler->IsTechnologyAvailable(NetworkTypePattern::Wimax())); | 1798 handler->IsTechnologyAvailable(NetworkTypePattern::Wimax())); |
1798 dictionary->SetBoolean( | 1799 dictionary->SetBoolean( |
1799 kTagWimaxEnabled, | 1800 kTagWimaxEnabled, |
1800 handler->IsTechnologyEnabled(NetworkTypePattern::Wimax())); | 1801 handler->IsTechnologyEnabled(NetworkTypePattern::Wimax())); |
1801 } | 1802 } |
1802 | 1803 |
1803 } // namespace options | 1804 } // namespace options |
1804 } // namespace chromeos | 1805 } // namespace chromeos |
OLD | NEW |