summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-07 05:34:01 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-07 05:34:01 +0000
commit4b828fdd45e1cb11b0cf3d623ff1575ca41d3b8a (patch)
treeb716676ff8ab5ab70316eed70e549c3e1a5c959d
parentfbcdb02ae14e31b349803e36501468187e5494e1 (diff)
downloadchromium_src-4b828fdd45e1cb11b0cf3d623ff1575ca41d3b8a.zip
chromium_src-4b828fdd45e1cb11b0cf3d623ff1575ca41d3b8a.tar.gz
chromium_src-4b828fdd45e1cb11b0cf3d623ff1575ca41d3b8a.tar.bz2
Convert browser/dom_ui/a*.cc to not use wstrings/wchar_t*s.
BUG=23581 TEST=builds and tests pass Review URL: http://codereview.chromium.org/3078032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55339 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/dom_ui/add_startup_page_handler.cc12
-rw-r--r--chrome/browser/dom_ui/advanced_options_handler.cc156
-rw-r--r--chrome/browser/dom_ui/app_launcher_handler.cc16
-rw-r--r--chrome/browser/dom_ui/autofill_options_handler.cc4
4 files changed, 96 insertions, 92 deletions
diff --git a/chrome/browser/dom_ui/add_startup_page_handler.cc b/chrome/browser/dom_ui/add_startup_page_handler.cc
index e246aba..c74c8cb 100644
--- a/chrome/browser/dom_ui/add_startup_page_handler.cc
+++ b/chrome/browser/dom_ui/add_startup_page_handler.cc
@@ -19,11 +19,11 @@ AddStartupPageHandler::~AddStartupPageHandler() {
void AddStartupPageHandler::GetLocalizedValues(
DictionaryValue* localized_strings) {
DCHECK(localized_strings);
- localized_strings->SetString(L"addStartupPageTitle",
- l10n_util::GetString(IDS_ASI_ADD_TITLE));
- localized_strings->SetString(L"addStartupPageAddButton",
- l10n_util::GetString(IDS_ASI_ADD));
- localized_strings->SetString(L"addStartupPageCancelButton",
- l10n_util::GetString(IDS_CANCEL));
+ localized_strings->SetString("addStartupPageTitle",
+ l10n_util::GetStringUTF16(IDS_ASI_ADD_TITLE));
+ localized_strings->SetString("addStartupPageAddButton",
+ l10n_util::GetStringUTF16(IDS_ASI_ADD));
+ localized_strings->SetString("addStartupPageCancelButton",
+ l10n_util::GetStringUTF16(IDS_CANCEL));
}
diff --git a/chrome/browser/dom_ui/advanced_options_handler.cc b/chrome/browser/dom_ui/advanced_options_handler.cc
index be02a3e..64f0f60 100644
--- a/chrome/browser/dom_ui/advanced_options_handler.cc
+++ b/chrome/browser/dom_ui/advanced_options_handler.cc
@@ -39,82 +39,86 @@ void AdvancedOptionsHandler::GetLocalizedValues(
DictionaryValue* localized_strings) {
DCHECK(localized_strings);
- localized_strings->SetString(L"privacyLearnMoreURL",
- l10n_util::GetString(IDS_LEARN_MORE_PRIVACY_URL));
- localized_strings->SetString(L"privacyLearnMoreLabel",
- l10n_util::GetString(IDS_OPTIONS_LEARN_MORE_LABEL));
- localized_strings->SetString(L"downloadLocationGroupName",
- l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME));
- localized_strings->SetString(L"downloadLocationBrowseButton",
- l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_BUTTON));
- localized_strings->SetString(L"downloadLocationBrowseTitle",
- l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE));
- localized_strings->SetString(L"downloadLocationBrowseWindowTitle",
- l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_WINDOW_TITLE));
- localized_strings->SetString(L"downloadLocationAskForSaveLocation",
- l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_ASKFORSAVELOCATION));
- localized_strings->SetString(L"autoOpenFileTypesInfo",
- l10n_util::GetString(IDS_OPTIONS_AUTOOPENFILETYPES_INFO));
- localized_strings->SetString(L"autoOpenFileTypesResetToDefault",
- l10n_util::GetString(IDS_OPTIONS_AUTOOPENFILETYPES_RESETTODEFAULT));
- localized_strings->SetString(L"gearSettingsGroupName",
- l10n_util::GetString(IDS_OPTIONS_GEARSSETTINGS_GROUP_NAME));
- localized_strings->SetString(L"gearSettingsConfigureGearsButton",
- l10n_util::GetString(IDS_OPTIONS_GEARSSETTINGS_CONFIGUREGEARS_BUTTON));
- localized_strings->SetString(L"translateEnableTranslate",
- l10n_util::GetString(IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE));
- localized_strings->SetString(L"certificatesLabel",
- l10n_util::GetString(IDS_OPTIONS_CERTIFICATES_LABEL));
- localized_strings->SetString(L"certificatesManageButton",
- l10n_util::GetString(IDS_OPTIONS_CERTIFICATES_MANAGE_BUTTON));
- localized_strings->SetString(L"proxiesLabel",
- l10n_util::GetString(IDS_OPTIONS_PROXIES_LABEL));
- localized_strings->SetString(L"proxiesConfigureButton",
- l10n_util::GetString(IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON));
- localized_strings->SetString(L"safeBrowsingEnableProtection",
- l10n_util::GetString(IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION));
- localized_strings->SetString(L"sslGroupDescription",
- l10n_util::GetString(IDS_OPTIONS_SSL_GROUP_DESCRIPTION));
- localized_strings->SetString(L"sslUseSSL2",
- l10n_util::GetString(IDS_OPTIONS_SSL_USESSL2));
- localized_strings->SetString(L"sslCheckRevocation",
- l10n_util::GetString(IDS_OPTIONS_SSL_CHECKREVOCATION));
- localized_strings->SetString(L"sslUseSSL3",
- l10n_util::GetString(IDS_OPTIONS_SSL_USESSL3));
- localized_strings->SetString(L"sslUseTLS1",
- l10n_util::GetString(IDS_OPTIONS_SSL_USETLS1));
- localized_strings->SetString(L"networkDNSPrefetchEnabledDescription",
- l10n_util::GetString(IDS_NETWORK_DNS_PREFETCH_ENABLED_DESCRIPTION));
- localized_strings->SetString(L"privacyContentSettingsButton",
- l10n_util::GetString(IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON));
- localized_strings->SetString(L"privacyClearDataButton",
- l10n_util::GetString(IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON));
- localized_strings->SetString(L"linkDoctorPref",
- l10n_util::GetString(IDS_OPTIONS_LINKDOCTOR_PREF));
- localized_strings->SetString(L"suggestPref",
- l10n_util::GetString(IDS_OPTIONS_SUGGEST_PREF));
- localized_strings->SetString(L"tabsToLinksPref",
- l10n_util::GetString(IDS_OPTIONS_TABS_TO_LINKS_PREF));
- localized_strings->SetString(L"fontSettingsInfo",
- l10n_util::GetString(IDS_OPTIONS_FONTSETTINGS_INFO));
- localized_strings->SetString(L"fontSettingsConfigureFontsOnlyButton",
- l10n_util::GetString(IDS_OPTIONS_FONTSETTINGS_CONFIGUREFONTSONLY_BUTTON));
- localized_strings->SetString(L"advancedSectionTitlePrivacy",
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY));
- localized_strings->SetString(L"advancedSectionTitleContent",
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT));
- localized_strings->SetString(L"advancedSectionTitleSecurity",
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY));
- localized_strings->SetString(L"advancedSectionTitleNetwork",
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_NETWORK));
- localized_strings->SetString(L"advancedSectionTitleTranslate",
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_TRANSLATE));
- localized_strings->SetString(L"translateEnableTranslate",
- l10n_util::GetString(IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE));
- localized_strings->SetString(L"enableLogging",
- l10n_util::GetString(IDS_OPTIONS_ENABLE_LOGGING));
- localized_strings->SetString(L"disableServices",
- l10n_util::GetString(IDS_OPTIONS_DISABLE_SERVICES));
+ localized_strings->SetString("privacyLearnMoreURL",
+ l10n_util::GetStringUTF16(IDS_LEARN_MORE_PRIVACY_URL));
+ localized_strings->SetString("privacyLearnMoreLabel",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_LEARN_MORE_LABEL));
+ localized_strings->SetString("downloadLocationGroupName",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME));
+ localized_strings->SetString("downloadLocationBrowseButton",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_BUTTON));
+ localized_strings->SetString("downloadLocationBrowseTitle",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE));
+ localized_strings->SetString("downloadLocationBrowseWindowTitle",
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_WINDOW_TITLE));
+ localized_strings->SetString("downloadLocationAskForSaveLocation",
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_DOWNLOADLOCATION_ASKFORSAVELOCATION));
+ localized_strings->SetString("autoOpenFileTypesInfo",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_AUTOOPENFILETYPES_INFO));
+ localized_strings->SetString("autoOpenFileTypesResetToDefault",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_AUTOOPENFILETYPES_RESETTODEFAULT));
+ localized_strings->SetString("gearSettingsGroupName",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_GEARSSETTINGS_GROUP_NAME));
+ localized_strings->SetString("gearSettingsConfigureGearsButton",
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_GEARSSETTINGS_CONFIGUREGEARS_BUTTON));
+ localized_strings->SetString("translateEnableTranslate",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE));
+ localized_strings->SetString("certificatesLabel",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_CERTIFICATES_LABEL));
+ localized_strings->SetString("certificatesManageButton",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_CERTIFICATES_MANAGE_BUTTON));
+ localized_strings->SetString("proxiesLabel",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_PROXIES_LABEL));
+ localized_strings->SetString("proxiesConfigureButton",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON));
+ localized_strings->SetString("safeBrowsingEnableProtection",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION));
+ localized_strings->SetString("sslGroupDescription",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_SSL_GROUP_DESCRIPTION));
+ localized_strings->SetString("sslUseSSL2",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_SSL_USESSL2));
+ localized_strings->SetString("sslCheckRevocation",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_SSL_CHECKREVOCATION));
+ localized_strings->SetString("sslUseSSL3",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_SSL_USESSL3));
+ localized_strings->SetString("sslUseTLS1",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_SSL_USETLS1));
+ localized_strings->SetString("networkDNSPrefetchEnabledDescription",
+ l10n_util::GetStringUTF16(IDS_NETWORK_DNS_PREFETCH_ENABLED_DESCRIPTION));
+ localized_strings->SetString("privacyContentSettingsButton",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON));
+ localized_strings->SetString("privacyClearDataButton",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON));
+ localized_strings->SetString("linkDoctorPref",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_LINKDOCTOR_PREF));
+ localized_strings->SetString("suggestPref",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_SUGGEST_PREF));
+ localized_strings->SetString("tabsToLinksPref",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_TABS_TO_LINKS_PREF));
+ localized_strings->SetString("fontSettingsInfo",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_FONTSETTINGS_INFO));
+ localized_strings->SetString("fontSettingsConfigureFontsOnlyButton",
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_FONTSETTINGS_CONFIGUREFONTSONLY_BUTTON));
+ localized_strings->SetString("advancedSectionTitlePrivacy",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY));
+ localized_strings->SetString("advancedSectionTitleContent",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT));
+ localized_strings->SetString("advancedSectionTitleSecurity",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY));
+ localized_strings->SetString("advancedSectionTitleNetwork",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_ADVANCED_SECTION_TITLE_NETWORK));
+ localized_strings->SetString("advancedSectionTitleTranslate",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_ADVANCED_SECTION_TITLE_TRANSLATE));
+ localized_strings->SetString("translateEnableTranslate",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE));
+ localized_strings->SetString("enableLogging",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_LOGGING));
+ localized_strings->SetString("disableServices",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_DISABLE_SERVICES));
}
void AdvancedOptionsHandler::Initialize() {
diff --git a/chrome/browser/dom_ui/app_launcher_handler.cc b/chrome/browser/dom_ui/app_launcher_handler.cc
index 8b229d9..7489a96 100644
--- a/chrome/browser/dom_ui/app_launcher_handler.cc
+++ b/chrome/browser/dom_ui/app_launcher_handler.cc
@@ -80,11 +80,11 @@ void AppLauncherHandler::Observe(NotificationType type,
void AppLauncherHandler::CreateAppInfo(Extension* extension,
DictionaryValue* value) {
value->Clear();
- value->SetString(L"id", extension->id());
- value->SetString(L"name", extension->name());
- value->SetString(L"description", extension->description());
- value->SetString(L"launch_url", extension->GetFullLaunchURL().spec());
- value->SetString(L"options_url", extension->options_url().spec());
+ value->SetString("id", extension->id());
+ value->SetString("name", extension->name());
+ value->SetString("description", extension->description());
+ value->SetString("launch_url", extension->GetFullLaunchURL().spec());
+ value->SetString("options_url", extension->options_url().spec());
FilePath relative_path =
extension->GetIconPath(Extension::EXTENSION_ICON_LARGE).relative_path();
@@ -96,7 +96,7 @@ void AppLauncherHandler::CreateAppInfo(Extension* extension,
#endif // OS_WIN
GURL icon_url = extension->GetResourceURL(path);
- value->SetString(L"icon", icon_url.spec());
+ value->SetString("icon", icon_url.spec());
}
void AppLauncherHandler::HandleGetApps(const Value* value) {
@@ -104,7 +104,7 @@ void AppLauncherHandler::HandleGetApps(const Value* value) {
switches::kAppsDebug);
DictionaryValue dictionary;
- dictionary.SetBoolean(L"showDebugLink", show_debug_link);
+ dictionary.SetBoolean("showDebugLink", show_debug_link);
ListValue* list = new ListValue();
const ExtensionList* extensions = extensions_service_->extensions();
@@ -117,7 +117,7 @@ void AppLauncherHandler::HandleGetApps(const Value* value) {
}
}
- dictionary.Set(L"apps", list);
+ dictionary.Set("apps", list);
dom_ui_->CallJavascriptFunction(L"getAppsCallback", dictionary);
// First time we get here we set up the observer so that we can tell update
diff --git a/chrome/browser/dom_ui/autofill_options_handler.cc b/chrome/browser/dom_ui/autofill_options_handler.cc
index 441a2aa..f5925492 100644
--- a/chrome/browser/dom_ui/autofill_options_handler.cc
+++ b/chrome/browser/dom_ui/autofill_options_handler.cc
@@ -19,8 +19,8 @@ void AutoFillOptionsHandler::GetLocalizedValues(
DictionaryValue* localized_strings) {
DCHECK(localized_strings);
- localized_strings->SetString(L"autoFillOptionsTitle",
- l10n_util::GetString(IDS_AUTOFILL_OPTIONS_TITLE));
+ localized_strings->SetString("autoFillOptionsTitle",
+ l10n_util::GetStringUTF16(IDS_AUTOFILL_OPTIONS_TITLE));
}
void AutoFillOptionsHandler::RegisterMessages() {