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

Side by Side Diff: chrome/browser/chromeos/proxy_cros_settings_parser.cc

Issue 399493002: Remove many instances of CreateBooleanValue. (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/chromeos/proxy_cros_settings_parser.h" 5 #include "chrome/browser/chromeos/proxy_cros_settings_parser.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chromeos/ui_proxy_config.h" 9 #include "chrome/browser/chromeos/ui_proxy_config.h"
10 #include "chrome/browser/chromeos/ui_proxy_config_service.h" 10 #include "chrome/browser/chromeos/ui_proxy_config_service.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 break; 326 break;
327 case ProxyPrefs::CONFIG_OTHER_PRECEDE: 327 case ProxyPrefs::CONFIG_OTHER_PRECEDE:
328 controlled_by = "other"; 328 controlled_by = "other";
329 break; 329 break;
330 default: 330 default:
331 if (!config.user_modifiable) 331 if (!config.user_modifiable)
332 controlled_by = "shared"; 332 controlled_by = "shared";
333 break; 333 break;
334 } 334 }
335 } else if (path == kProxySingle) { 335 } else if (path == kProxySingle) {
336 data = base::Value::CreateBooleanValue( 336 data = new base::FundamentalValue(config.mode ==
337 config.mode == UIProxyConfig::MODE_SINGLE_PROXY); 337 UIProxyConfig::MODE_SINGLE_PROXY);
338 } else if (path == kProxyUsePacUrl) { 338 } else if (path == kProxyUsePacUrl) {
339 data = base::Value::CreateBooleanValue( 339 data = new base::FundamentalValue(config.mode ==
340 config.mode == UIProxyConfig::MODE_PAC_SCRIPT); 340 UIProxyConfig::MODE_PAC_SCRIPT);
341 } else if (path == kProxyFtpUrl) { 341 } else if (path == kProxyFtpUrl) {
342 data = CreateServerHostValue(config.ftp_proxy); 342 data = CreateServerHostValue(config.ftp_proxy);
343 } else if (path == kProxySocks) { 343 } else if (path == kProxySocks) {
344 data = CreateServerHostValue(config.socks_proxy); 344 data = CreateServerHostValue(config.socks_proxy);
345 } else if (path == kProxyHttpPort) { 345 } else if (path == kProxyHttpPort) {
346 data = CreateServerPortValue(config.http_proxy); 346 data = CreateServerPortValue(config.http_proxy);
347 } else if (path == kProxyHttpsPort) { 347 } else if (path == kProxyHttpsPort) {
348 data = CreateServerPortValue(config.https_proxy); 348 data = CreateServerPortValue(config.https_proxy);
349 } else if (path == kProxyFtpPort) { 349 } else if (path == kProxyFtpPort) {
350 data = CreateServerPortValue(config.ftp_proxy); 350 data = CreateServerPortValue(config.ftp_proxy);
(...skipping 22 matching lines...) Expand all
373 } else { 373 } else {
374 dict->SetBoolean("disabled", false); 374 dict->SetBoolean("disabled", false);
375 } 375 }
376 *out_value = dict; 376 *out_value = dict;
377 return true; 377 return true;
378 } 378 }
379 379
380 } // namespace proxy_cros_settings_parser 380 } // namespace proxy_cros_settings_parser
381 381
382 } // namespace chromeos 382 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698