summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 19:40:42 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 19:40:42 +0000
commit13ecb04b3a06a7e84c95a6b7c99f64529aa03b61 (patch)
tree99959aee149a43a0213d14dc448e8c3e1b831733 /chrome
parent698f7f43984b1acbc74b0a64fd2205a3ff4efe07 (diff)
downloadchromium_src-13ecb04b3a06a7e84c95a6b7c99f64529aa03b61.zip
chromium_src-13ecb04b3a06a7e84c95a6b7c99f64529aa03b61.tar.gz
chromium_src-13ecb04b3a06a7e84c95a6b7c99f64529aa03b61.tar.bz2
Remove wstring-ness from some more locale variables.
Review URL: http://codereview.chromium.org/3043055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54945 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/plugin_service.cc2
-rw-r--r--chrome/browser/plugin_service.h2
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc2
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.h2
-rw-r--r--chrome/common/common_glue.cc6
-rw-r--r--chrome/common/render_messages_internal.h2
-rw-r--r--chrome/plugin/chrome_plugin_host.cc4
-rw-r--r--chrome/renderer/localized_error.cc2
-rw-r--r--chrome/renderer/renderer_webkitclient_impl.cc2
9 files changed, 12 insertions, 12 deletions
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc
index 0112a4f..c87f3fd 100644
--- a/chrome/browser/plugin_service.cc
+++ b/chrome/browser/plugin_service.cc
@@ -226,7 +226,7 @@ void PluginService::OpenChannelToPlugin(
ResourceMessageFilter* renderer_msg_filter,
const GURL& url,
const std::string& mime_type,
- const std::wstring& locale,
+ const std::string& locale,
IPC::Message* reply_msg) {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
bool allow_wildcard = true;
diff --git a/chrome/browser/plugin_service.h b/chrome/browser/plugin_service.h
index 63513bd..afce41d 100644
--- a/chrome/browser/plugin_service.h
+++ b/chrome/browser/plugin_service.h
@@ -80,7 +80,7 @@ class PluginService
void OpenChannelToPlugin(ResourceMessageFilter* renderer_msg_filter,
const GURL& url,
const std::string& mime_type,
- const std::wstring& locale,
+ const std::string& locale,
IPC::Message* reply_msg);
// Returns true if the given plugin is allowed to be used by a page with
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index e28146b..a8253e6 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -723,7 +723,7 @@ void ResourceMessageFilter::OnGetPluginInfo(const GURL& url,
void ResourceMessageFilter::OnOpenChannelToPlugin(const GURL& url,
const std::string& mime_type,
- const std::wstring& locale,
+ const std::string& locale,
IPC::Message* reply_msg) {
plugin_service_->OpenChannelToPlugin(
this, url, mime_type, locale, reply_msg);
diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h
index 2a4e6ce..d5cd9d9 100644
--- a/chrome/browser/renderer_host/resource_message_filter.h
+++ b/chrome/browser/renderer_host/resource_message_filter.h
@@ -178,7 +178,7 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter,
std::string* actual_mime_type);
void OnOpenChannelToPlugin(const GURL& url,
const std::string& mime_type,
- const std::wstring& locale,
+ const std::string& locale,
IPC::Message* reply_msg);
void OnLaunchNaCl(const std::wstring& url,
int channel_descriptor,
diff --git a/chrome/common/common_glue.cc b/chrome/common/common_glue.cc
index 95417ab..71312bb 100644
--- a/chrome/common/common_glue.cc
+++ b/chrome/common/common_glue.cc
@@ -29,13 +29,13 @@ bool IsPluginRunningInRendererProcess() {
return !IsPluginProcess();
}
-std::wstring GetWebKitLocale() {
+std::string GetWebKitLocale() {
// The browser process should have passed the locale to the renderer via the
// --lang command line flag. In single process mode, this will return the
// wrong value. TODO(tc): Fix this for single process mode.
const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
- const std::wstring& lang =
- parsed_command_line.GetSwitchValue(switches::kLang);
+ const std::string& lang =
+ parsed_command_line.GetSwitchValueASCII(switches::kLang);
DCHECK(!lang.empty() ||
(!parsed_command_line.HasSwitch(switches::kRendererProcess) &&
!parsed_command_line.HasSwitch(switches::kPluginProcess)));
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 89afec0..76d2585 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -1393,7 +1393,7 @@ IPC_BEGIN_MESSAGES(ViewHost)
IPC_SYNC_MESSAGE_CONTROL3_2(ViewHostMsg_OpenChannelToPlugin,
GURL /* url */,
std::string /* mime_type */,
- std::wstring /* locale */,
+ std::string /* locale */,
IPC::ChannelHandle /* handle to channel */,
WebPluginInfo /* info */)
diff --git a/chrome/plugin/chrome_plugin_host.cc b/chrome/plugin/chrome_plugin_host.cc
index a784ccc..d37a0f5 100644
--- a/chrome/plugin/chrome_plugin_host.cc
+++ b/chrome/plugin/chrome_plugin_host.cc
@@ -440,8 +440,8 @@ int STDCALL CPB_GetBrowsingContextInfo(
if (buf_size < sizeof(char*))
return sizeof(char*);
- std::wstring wretval = webkit_glue::GetWebKitLocale();
- *static_cast<char**>(buf) = CPB_StringDup(CPB_Alloc, WideToUTF8(wretval));
+ std::string retval = webkit_glue::GetWebKitLocale();
+ *static_cast<char**>(buf) = CPB_StringDup(CPB_Alloc, retval);
return CPERR_SUCCESS;
}
}
diff --git a/chrome/renderer/localized_error.cc b/chrome/renderer/localized_error.cc
index 00898e4..386e75b3 100644
--- a/chrome/renderer/localized_error.cc
+++ b/chrome/renderer/localized_error.cc
@@ -226,7 +226,7 @@ void GetLocalizedErrorValues(const WebURLError& error,
if (learn_more_url.is_valid()) {
// Add the language parameter to the URL.
std::string query = learn_more_url.query() + "&hl=" +
- WideToASCII(webkit_glue::GetWebKitLocale());
+ webkit_glue::GetWebKitLocale();
GURL::Replacements repl;
repl.SetQueryStr(query);
learn_more_url = learn_more_url.ReplaceComponents(repl);
diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc
index fb6b3b1..c0e4b85 100644
--- a/chrome/renderer/renderer_webkitclient_impl.cc
+++ b/chrome/renderer/renderer_webkitclient_impl.cc
@@ -225,7 +225,7 @@ void RendererWebKitClientImpl::cacheMetadata(
WebString RendererWebKitClientImpl::defaultLocale() {
// TODO(darin): Eliminate this webkit_glue call.
- return WideToUTF16(webkit_glue::GetWebKitLocale());
+ return ASCIIToUTF16(webkit_glue::GetWebKitLocale());
}
void RendererWebKitClientImpl::suddenTerminationChanged(bool enabled) {