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

Side by Side Diff: chrome/browser/extensions/api/proxy/proxy_api_helpers.cc

Issue 22885002: c/b/extensions, json_schema_compiler: Do not use Value::Create*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed C-style casts. Created 7 years, 4 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 (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 // Implementation of helper functions for the Chrome Extensions Proxy Settings 5 // Implementation of helper functions for the Chrome Extensions Proxy Settings
6 // API. 6 // API.
7 // 7 //
8 // Throughout this code, we report errors to the user by setting an |error| 8 // Throughout this code, we report errors to the user by setting an |error|
9 // parameter, if and only if these errors can be cause by invalid input 9 // parameter, if and only if these errors can be cause by invalid input
10 // from the extension and we cannot expect that the extensions API has 10 // from the extension and we cannot expect that the extensions API has
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 pac_script_dict->SetBoolean(keys::kProxyConfigPacScriptMandatory, 483 pac_script_dict->SetBoolean(keys::kProxyConfigPacScriptMandatory,
484 pac_mandatory); 484 pac_mandatory);
485 return pac_script_dict.release(); 485 return pac_script_dict.release();
486 } 486 }
487 487
488 base::ListValue* TokenizeToStringList(const std::string& in, 488 base::ListValue* TokenizeToStringList(const std::string& in,
489 const std::string& delims) { 489 const std::string& delims) {
490 base::ListValue* out = new base::ListValue; 490 base::ListValue* out = new base::ListValue;
491 base::StringTokenizer entries(in, delims); 491 base::StringTokenizer entries(in, delims);
492 while (entries.GetNext()) 492 while (entries.GetNext())
493 out->Append(Value::CreateStringValue(entries.token())); 493 out->Append(new base::StringValue(entries.token()));
494 return out; 494 return out;
495 } 495 }
496 496
497 } // namespace proxy_api_helpers 497 } // namespace proxy_api_helpers
498 } // namespace extensions 498 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698