summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_proxy_api.cc
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-14 16:29:42 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-14 16:29:42 +0000
commit88dc06904f5ebf68d962ac3e5c7a77ca64ac4ec0 (patch)
tree136274bffa099a690e9195c7ba9c271bd90cf085 /chrome/browser/extensions/extension_proxy_api.cc
parentb1d08c68cf8cc377fa6250642cf668dc67bda05d (diff)
downloadchromium_src-88dc06904f5ebf68d962ac3e5c7a77ca64ac4ec0.zip
chromium_src-88dc06904f5ebf68d962ac3e5c7a77ca64ac4ec0.tar.gz
chromium_src-88dc06904f5ebf68d962ac3e5c7a77ca64ac4ec0.tar.bz2
Convert more wide strings in browser/extensions.
I think this kills off the remaining uses of the now-deprecated wstring DictionaryValue methods. BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3125010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56141 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_proxy_api.cc')
-rw-r--r--chrome/browser/extensions/extension_proxy_api.cc29
1 files changed, 15 insertions, 14 deletions
diff --git a/chrome/browser/extensions/extension_proxy_api.cc b/chrome/browser/extensions/extension_proxy_api.cc
index 053b0fe..1e9ba78 100644
--- a/chrome/browser/extensions/extension_proxy_api.cc
+++ b/chrome/browser/extensions/extension_proxy_api.cc
@@ -25,19 +25,20 @@ enum {
// The names of the JavaScript properties to extract from the args_.
// These must be kept in sync with the SCHEME_* constants.
-static const std::wstring field_name[] = {L"singleProxy",
- L"proxyForHttp",
- L"proxyForHttps",
- L"proxyForFtp",
- L"socksProxy"};
+const char* field_name[] = { "singleProxy",
+ "proxyForHttp",
+ "proxyForHttps",
+ "proxyForFtp",
+ "socksProxy" };
// The names of the schemes to be used to build the preference value string.
// These must be kept in sync with the SCHEME_* constants.
-static const std::string scheme_name[] = {"*error*",
- "http",
- "https",
- "ftp",
- "socks"};
+const char* scheme_name[] = { "*error*",
+ "http",
+ "https",
+ "ftp",
+ "socks" };
+
} // namespace
COMPILE_ASSERT(SCHEME_MAX == SCHEME_SOCKS, SCHEME_MAX_must_equal_SCHEME_SOCKS);
@@ -51,7 +52,7 @@ bool UseCustomProxySettingsFunction::RunImpl() {
EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &proxy_config));
DictionaryValue* proxy_rules;
- EXTENSION_FUNCTION_VALIDATE(proxy_config->GetDictionary(L"rules",
+ EXTENSION_FUNCTION_VALIDATE(proxy_config->GetDictionary("rules",
&proxy_rules));
// Local data into which the parameters will be parsed. has_proxy describes
@@ -121,8 +122,8 @@ bool UseCustomProxySettingsFunction::RunImpl() {
bool UseCustomProxySettingsFunction::GetProxyServer(
const DictionaryValue* dict, ProxyServer* proxy_server) {
- dict->GetString(L"scheme", &proxy_server->scheme);
- EXTENSION_FUNCTION_VALIDATE(dict->GetString(L"host", &proxy_server->host));
- dict->GetInteger(L"port", &proxy_server->port);
+ dict->GetString("scheme", &proxy_server->scheme);
+ EXTENSION_FUNCTION_VALIDATE(dict->GetString("host", &proxy_server->host));
+ dict->GetInteger("port", &proxy_server->port);
return true;
}