diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-24 18:51:59 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-24 18:51:59 +0000 |
commit | 762398d7d7ef5a66be78c8b11cf20f74f0b40dff (patch) | |
tree | f66368f3132ef9044c8c7053557c1057b2a16056 /chrome/browser/enumerate_modules_model_win.cc | |
parent | 1fe96d0176a2014e38af43154cd27cbf64cf99bc (diff) | |
download | chromium_src-762398d7d7ef5a66be78c8b11cf20f74f0b40dff.zip chromium_src-762398d7d7ef5a66be78c8b11cf20f74f0b40dff.tar.gz chromium_src-762398d7d7ef5a66be78c8b11cf20f74f0b40dff.tar.bz2 |
Update some uses of UTF conversions in chrome/browser to use the base:: namespace.
BUG=330556
TEST=no change
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/120953002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242450 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/enumerate_modules_model_win.cc')
-rw-r--r-- | chrome/browser/enumerate_modules_model_win.cc | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/chrome/browser/enumerate_modules_model_win.cc b/chrome/browser/enumerate_modules_model_win.cc index be2e42f..746cc07 100644 --- a/chrome/browser/enumerate_modules_model_win.cc +++ b/chrome/browser/enumerate_modules_model_win.cc @@ -375,8 +375,8 @@ ModuleEnumerator::ModuleStatus ModuleEnumerator::Match( } std::string filename_hash, location_hash; - GenerateHash(WideToUTF8(module.name), &filename_hash); - GenerateHash(WideToUTF8(module.location), &location_hash); + GenerateHash(base::WideToUTF8(module.name), &filename_hash); + GenerateHash(base::WideToUTF8(module.location), &location_hash); // Filenames are mandatory. Location is mandatory if given. if (filename_hash == blacklisted.filename && @@ -404,8 +404,8 @@ ModuleEnumerator::ModuleStatus ModuleEnumerator::Match( std::string desc_or_signer(blacklisted.desc_or_signer); std::string signer_hash, description_hash; - GenerateHash(WideToUTF8(module.digital_signer), &signer_hash); - GenerateHash(WideToUTF8(module.description), &description_hash); + GenerateHash(base::WideToUTF8(module.digital_signer), &signer_hash); + GenerateHash(base::WideToUTF8(module.description), &description_hash); // If signatures match (or both are empty), then we have a winner. if (signer_hash == desc_or_signer) @@ -646,7 +646,7 @@ void ModuleEnumerator::PreparePathMappings() { std::string path; if (environment->GetVar(WideToASCII(*variable).c_str(), &path)) { path_mapping_.push_back( - std::make_pair(base::i18n::ToLower(UTF8ToUTF16(path)) + L"\\", + std::make_pair(base::i18n::ToLower(base::UTF8ToUTF16(path)) + L"\\", L"%" + base::i18n::ToLower(*variable) + L"%")); } } @@ -879,16 +879,16 @@ base::ListValue* EnumerateModulesModel::GetModuleList() const { if ((module->type & ModuleEnumerator::LOADED_MODULE) == 0) { // Module is not loaded, denote type of module. if (module->type & ModuleEnumerator::SHELL_EXTENSION) - type_string = ASCIIToWide("Shell Extension"); + type_string = base::ASCIIToWide("Shell Extension"); if (module->type & ModuleEnumerator::WINSOCK_MODULE_REGISTRATION) { if (!type_string.empty()) - type_string += ASCIIToWide(", "); - type_string += ASCIIToWide("Winsock"); + type_string += base::ASCIIToWide(", "); + type_string += base::ASCIIToWide("Winsock"); } // Must be one of the above type. DCHECK(!type_string.empty()); if (!limited_mode_) { - type_string += ASCIIToWide(" -- "); + type_string += base::ASCIIToWide(" -- "); type_string += l10n_util::GetStringUTF16(IDS_CONFLICTS_NOT_LOADED_YET); } } @@ -904,9 +904,10 @@ base::ListValue* EnumerateModulesModel::GetModuleList() const { if (!limited_mode_) { // Figure out the possible resolution help string. base::string16 actions; - base::string16 separator = ASCIIToWide(" ") + l10n_util::GetStringUTF16( - IDS_CONFLICTS_CHECK_POSSIBLE_ACTION_SEPERATOR) + - ASCIIToWide(" "); + base::string16 separator = base::ASCIIToWide(" ") + + l10n_util::GetStringUTF16( + IDS_CONFLICTS_CHECK_POSSIBLE_ACTION_SEPERATOR) + + base::ASCIIToWide(" "); if (module->recommended_action & ModuleEnumerator::NONE) { actions = l10n_util::GetStringUTF16( @@ -930,9 +931,11 @@ base::ListValue* EnumerateModulesModel::GetModuleList() const { actions += l10n_util::GetStringUTF16( IDS_CONFLICTS_CHECK_POSSIBLE_ACTION_DISABLE); } - base::string16 possible_resolution = actions.empty() ? ASCIIToWide("") : - l10n_util::GetStringUTF16(IDS_CONFLICTS_CHECK_POSSIBLE_ACTIONS) + - ASCIIToWide(" ") + + base::string16 possible_resolution = + actions.empty() ? base::ASCIIToWide("") + : l10n_util::GetStringUTF16( + IDS_CONFLICTS_CHECK_POSSIBLE_ACTIONS) + + base::ASCIIToWide(" ") + actions; data->SetString("possibleResolution", possible_resolution); data->SetString("help_url", @@ -1056,14 +1059,14 @@ GURL EnumerateModulesModel::ConstructHelpCenterUrl( // Construct the needed hashes. std::string filename, location, description, signer; - GenerateHash(WideToUTF8(module.name), &filename); - GenerateHash(WideToUTF8(module.location), &location); - GenerateHash(WideToUTF8(module.description), &description); - GenerateHash(WideToUTF8(module.digital_signer), &signer); + GenerateHash(base::WideToUTF8(module.name), &filename); + GenerateHash(base::WideToUTF8(module.location), &location); + GenerateHash(base::WideToUTF8(module.description), &description); + GenerateHash(base::WideToUTF8(module.digital_signer), &signer); base::string16 url = l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS, - ASCIIToUTF16(filename), ASCIIToUTF16(location), - ASCIIToUTF16(description), ASCIIToUTF16(signer)); - return GURL(UTF16ToUTF8(url)); + base::ASCIIToUTF16(filename), base::ASCIIToUTF16(location), + base::ASCIIToUTF16(description), base::ASCIIToUTF16(signer)); + return GURL(base::UTF16ToUTF8(url)); } |