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

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

Issue 1221033002: Add proxy_config component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update copyrights Created 5 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
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
11 // caught this error before. In all other cases we are dealing with internal 11 // caught this error before. In all other cases we are dealing with internal
12 // errors and log to LOG(ERROR). 12 // errors and log to LOG(ERROR).
13 13
14 #include "chrome/browser/extensions/api/proxy/proxy_api_helpers.h" 14 #include "chrome/browser/extensions/api/proxy/proxy_api_helpers.h"
15 15
16 #include "base/base64.h" 16 #include "base/base64.h"
17 #include "base/basictypes.h" 17 #include "base/basictypes.h"
18 #include "base/strings/string_tokenizer.h" 18 #include "base/strings/string_tokenizer.h"
19 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
20 #include "base/strings/utf_string_conversions.h" 20 #include "base/strings/utf_string_conversions.h"
21 #include "base/values.h" 21 #include "base/values.h"
22 #include "chrome/browser/extensions/api/proxy/proxy_api_constants.h" 22 #include "chrome/browser/extensions/api/proxy/proxy_api_constants.h"
23 #include "chrome/browser/prefs/proxy_config_dictionary.h" 23 #include "components/proxy_config/proxy_config_dictionary.h"
24 #include "extensions/common/error_utils.h" 24 #include "extensions/common/error_utils.h"
25 #include "net/base/data_url.h" 25 #include "net/base/data_url.h"
26 #include "net/proxy/proxy_config.h" 26 #include "net/proxy/proxy_config.h"
27 27
28 namespace extensions { 28 namespace extensions {
29 29
30 namespace keys = proxy_api_constants; 30 namespace keys = proxy_api_constants;
31 31
32 namespace proxy_api_helpers { 32 namespace proxy_api_helpers {
33 33
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 const std::string& delims) { 492 const std::string& delims) {
493 base::ListValue* out = new base::ListValue; 493 base::ListValue* out = new base::ListValue;
494 base::StringTokenizer entries(in, delims); 494 base::StringTokenizer entries(in, delims);
495 while (entries.GetNext()) 495 while (entries.GetNext())
496 out->Append(new base::StringValue(entries.token())); 496 out->Append(new base::StringValue(entries.token()));
497 return out; 497 return out;
498 } 498 }
499 499
500 } // namespace proxy_api_helpers 500 } // namespace proxy_api_helpers
501 } // namespace extensions 501 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698