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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc

Issue 385263004: Get rid of some uses of CreateIntegerValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | Annotate | Revision Log
OLDNEW
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 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 const base::ListValue* args) { 1129 const base::ListValue* args) {
1130 std::string service_path, prefer_network_str; 1130 std::string service_path, prefer_network_str;
1131 if (args->GetSize() < 2 || 1131 if (args->GetSize() < 2 ||
1132 !args->GetString(0, &service_path) || 1132 !args->GetString(0, &service_path) ||
1133 !args->GetString(1, &prefer_network_str)) { 1133 !args->GetString(1, &prefer_network_str)) {
1134 NOTREACHED(); 1134 NOTREACHED();
1135 return; 1135 return;
1136 } 1136 }
1137 content::RecordAction(base::UserMetricsAction("Options_NetworkSetPrefer")); 1137 content::RecordAction(base::UserMetricsAction("Options_NetworkSetPrefer"));
1138 int priority = (prefer_network_str == kTagTrue) ? kPreferredPriority : 0; 1138 int priority = (prefer_network_str == kTagTrue) ? kPreferredPriority : 0;
1139 SetNetworkProperty(service_path, shill::kPriorityProperty, 1139 SetNetworkProperty(service_path,
1140 base::Value::CreateIntegerValue(priority)); 1140 shill::kPriorityProperty,
1141 new base::FundamentalValue(priority));
1141 } 1142 }
1142 1143
1143 void InternetOptionsHandler::SetAutoConnectCallback( 1144 void InternetOptionsHandler::SetAutoConnectCallback(
1144 const base::ListValue* args) { 1145 const base::ListValue* args) {
1145 std::string service_path, auto_connect_str; 1146 std::string service_path, auto_connect_str;
1146 if (args->GetSize() < 2 || 1147 if (args->GetSize() < 2 ||
1147 !args->GetString(0, &service_path) || 1148 !args->GetString(0, &service_path) ||
1148 !args->GetString(1, &auto_connect_str)) { 1149 !args->GetString(1, &auto_connect_str)) {
1149 NOTREACHED(); 1150 NOTREACHED();
1150 return; 1151 return;
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 dictionary->SetBoolean( 1568 dictionary->SetBoolean(
1568 kTagWimaxAvailable, 1569 kTagWimaxAvailable,
1569 handler->IsTechnologyAvailable(NetworkTypePattern::Wimax())); 1570 handler->IsTechnologyAvailable(NetworkTypePattern::Wimax()));
1570 dictionary->SetBoolean( 1571 dictionary->SetBoolean(
1571 kTagWimaxEnabled, 1572 kTagWimaxEnabled,
1572 handler->IsTechnologyEnabled(NetworkTypePattern::Wimax())); 1573 handler->IsTechnologyEnabled(NetworkTypePattern::Wimax()));
1573 } 1574 }
1574 1575
1575 } // namespace options 1576 } // namespace options
1576 } // namespace chromeos 1577 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings.cc ('k') | chrome/browser/ui/webui/policy_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698