OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 pac_script_dict->SetBoolean(keys::kProxyConfigPacScriptMandatory, | 474 pac_script_dict->SetBoolean(keys::kProxyConfigPacScriptMandatory, |
475 pac_mandatory); | 475 pac_mandatory); |
476 return pac_script_dict.release(); | 476 return pac_script_dict.release(); |
477 } | 477 } |
478 | 478 |
479 ListValue* TokenizeToStringList(const std::string& in, | 479 ListValue* TokenizeToStringList(const std::string& in, |
480 const std::string& delims) { | 480 const std::string& delims) { |
481 ListValue* out = new ListValue; | 481 ListValue* out = new ListValue; |
482 StringTokenizer entries(in, delims); | 482 StringTokenizer entries(in, delims); |
483 while (entries.GetNext()) | 483 while (entries.GetNext()) |
484 out->Append(Value::CreateStringValue(entries.token())); | 484 out->Append(base::StringValue::New(entries.token())); |
485 return out; | 485 return out; |
486 } | 486 } |
487 | 487 |
488 } // namespace extension_proxy_api_helpers | 488 } // namespace extension_proxy_api_helpers |
OLD | NEW |