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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |