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 // 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 pac_script_dict->SetBoolean(keys::kProxyConfigPacScriptMandatory, | 488 pac_script_dict->SetBoolean(keys::kProxyConfigPacScriptMandatory, |
489 pac_mandatory); | 489 pac_mandatory); |
490 return pac_script_dict.release(); | 490 return pac_script_dict.release(); |
491 } | 491 } |
492 | 492 |
493 base::ListValue* TokenizeToStringList(const std::string& in, | 493 base::ListValue* TokenizeToStringList(const std::string& in, |
494 const std::string& delims) { | 494 const std::string& delims) { |
495 base::ListValue* out = new base::ListValue; | 495 base::ListValue* out = new base::ListValue; |
496 base::StringTokenizer entries(in, delims); | 496 base::StringTokenizer entries(in, delims); |
497 while (entries.GetNext()) | 497 while (entries.GetNext()) |
498 out->Append(new base::StringValue(entries.token())); | 498 out->AppendString(entries.token()); |
499 return out; | 499 return out; |
500 } | 500 } |
501 | 501 |
502 } // namespace proxy_api_helpers | 502 } // namespace proxy_api_helpers |
503 } // namespace extensions | 503 } // namespace extensions |
OLD | NEW |