diff options
Diffstat (limited to 'chrome/browser/extensions')
13 files changed, 25 insertions, 27 deletions
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc index f5aff18..fb75d20 100644 --- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc @@ -635,10 +635,10 @@ bool DeveloperPrivatePackDirectoryFunction::RunImpl() { EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(2, &flags)); base::FilePath root_directory = - base::FilePath::FromWStringHack(base::UTF8ToWide(item_path_str_)); + base::FilePath::FromWStringHack(UTF8ToWide(item_path_str_)); base::FilePath key_file = - base::FilePath::FromWStringHack(base::UTF8ToWide(key_path_str_)); + base::FilePath::FromWStringHack(UTF8ToWide(key_path_str_)); developer::PackDirectoryResponse response; if (root_directory.empty()) { diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc index 014c324..5435410 100644 --- a/chrome/browser/extensions/api/file_system/file_system_api.cc +++ b/chrome/browser/extensions/api/file_system/file_system_api.cc @@ -231,7 +231,7 @@ bool GetFileTypesFromAcceptOption( std::string extension = *iter; StringToLowerASCII(&extension); #if defined(OS_WIN) - extension_set.insert(base::UTF8ToWide(*iter)); + extension_set.insert(UTF8ToWide(*iter)); #else extension_set.insert(*iter); #endif diff --git a/chrome/browser/extensions/api/file_system/file_system_api_unittest.cc b/chrome/browser/extensions/api/file_system/file_system_api_unittest.cc index 3334ff5..dafa230 100644 --- a/chrome/browser/extensions/api/file_system/file_system_api_unittest.cc +++ b/chrome/browser/extensions/api/file_system/file_system_api_unittest.cc @@ -48,7 +48,7 @@ AcceptOption* BuildAcceptOption(std::string description, } #if defined(OS_WIN) -#define ToStringType base::UTF8ToWide +#define ToStringType UTF8ToWide #else #define ToStringType #endif diff --git a/chrome/browser/extensions/api/serial/serial_port_enumerator_win.cc b/chrome/browser/extensions/api/serial/serial_port_enumerator_win.cc index ffb4988..090dccb 100644 --- a/chrome/browser/extensions/api/serial/serial_port_enumerator_win.cc +++ b/chrome/browser/extensions/api/serial/serial_port_enumerator_win.cc @@ -22,7 +22,7 @@ SerialPortEnumerator::GenerateValidSerialPortNames() { for (; iter_key.Valid(); ++iter_key) { string16 str(iter_key.Value()); - std::string device_string(base::WideToASCII(str)); + std::string device_string(WideToASCII(str)); name_set.insert(device_string); } return name_set; diff --git a/chrome/browser/extensions/api/system_info_storage/storage_info_provider_win.cc b/chrome/browser/extensions/api/system_info_storage/storage_info_provider_win.cc index 1cd8ea8..a8c8088 100644 --- a/chrome/browser/extensions/api/system_info_storage/storage_info_provider_win.cc +++ b/chrome/browser/extensions/api/system_info_storage/storage_info_provider_win.cc @@ -47,8 +47,7 @@ bool StorageInfoProviderWin::QueryInfo(StorageInfo* info) { // Iterate the drive string by 4 wchars each step for (unsigned int i = 0; i < string_length; i += 4) { linked_ptr<StorageUnitInfo> unit(new StorageUnitInfo()); - if (QueryUnitInfo(base::WideToUTF8(&logical_drive_strings[i]), - unit.get())) { + if (QueryUnitInfo(WideToUTF8(&logical_drive_strings[i]), unit.get())) { info->push_back(unit); } } diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc index f91a7b7..f3afc2a 100644 --- a/chrome/browser/extensions/api/tabs/tabs_api.cc +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc @@ -2100,7 +2100,7 @@ void ExecuteCodeInTabFunction::DidLoadAndLocalizeFile(bool success, resource_.relative_path().value()); #elif defined(OS_WIN) error_ = ErrorUtils::FormatErrorMessage(keys::kLoadFileError, - base::WideToUTF8(resource_.relative_path().value())); + WideToUTF8(resource_.relative_path().value())); #endif // OS_WIN SendResponse(false); } diff --git a/chrome/browser/extensions/app_notification_storage.cc b/chrome/browser/extensions/app_notification_storage.cc index 2c586ad..30d7977 100644 --- a/chrome/browser/extensions/app_notification_storage.cc +++ b/chrome/browser/extensions/app_notification_storage.cc @@ -214,7 +214,7 @@ bool LevelDbAppNotificationStorage::OpenDbIfNeeded(bool create_if_missing) { #if defined(OS_POSIX) std::string os_path = path_.value(); #elif defined(OS_WIN) - std::string os_path = base::Sysbase::WideToUTF8(path_.value()); + std::string os_path = base::SysWideToUTF8(path_.value()); #endif leveldb::Options options; diff --git a/chrome/browser/extensions/browser_action_apitest.cc b/chrome/browser/extensions/browser_action_apitest.cc index 2b3a220..c09a3d2 100644 --- a/chrome/browser/extensions/browser_action_apitest.cc +++ b/chrome/browser/extensions/browser_action_apitest.cc @@ -19,13 +19,12 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationBrowserAction) { ASSERT_EQ(size_before + 1, service->extensions()->size()); - EXPECT_STREQ( - base::WideToUTF8(L"Hreggvi\u00F0ur: l10n browser action").c_str(), - extension->description().c_str()); - EXPECT_STREQ(base::WideToUTF8(L"Hreggvi\u00F0ur is my name").c_str(), + EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur: l10n browser action").c_str(), + extension->description().c_str()); + EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur is my name").c_str(), extension->name().c_str()); int tab_id = ExtensionTabUtil::GetTabId( browser()->tab_strip_model()->GetActiveWebContents()); - EXPECT_STREQ(base::WideToUTF8(L"Hreggvi\u00F0ur").c_str(), + EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur").c_str(), extension->browser_action()->GetTitle(tab_id).c_str()); } diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc index 2895378..5e226d1 100644 --- a/chrome/browser/extensions/extension_prefs.cc +++ b/chrome/browser/extensions/extension_prefs.cc @@ -1551,7 +1551,7 @@ base::FilePath ExtensionPrefs::GetExtensionPath( return base::FilePath(); return install_directory_.Append( - base::FilePath::FromWStringHack(base::UTF8ToWide(path))); + base::FilePath::FromWStringHack(UTF8ToWide(path))); } void ExtensionPrefs::UpdateExtensionPref(const std::string& extension_id, diff --git a/chrome/browser/extensions/external_pref_loader.cc b/chrome/browser/extensions/external_pref_loader.cc index f030223..b0c89d2 100644 --- a/chrome/browser/extensions/external_pref_loader.cc +++ b/chrome/browser/extensions/external_pref_loader.cc @@ -40,7 +40,7 @@ std::set<base::FilePath> GetPrefsCandidateFilesFromFolder( false, // Recursive. file_util::FileEnumerator::FILES); #if defined(OS_WIN) - base::FilePath::StringType extension = base::UTF8ToWide(std::string(".json")); + base::FilePath::StringType extension = UTF8ToWide(std::string(".json")); #elif defined(OS_POSIX) base::FilePath::StringType extension(".json"); #endif @@ -210,7 +210,7 @@ void ExternalPrefLoader::ReadStandaloneExtensionPrefFiles( std::string id = #if defined(OS_WIN) - base::WideToASCII( + WideToASCII( extension_candidate_path.RemoveExtension().BaseName().value()); #elif defined(OS_POSIX) extension_candidate_path.RemoveExtension().BaseName().value().c_str(); diff --git a/chrome/browser/extensions/external_registry_loader_win.cc b/chrome/browser/extensions/external_registry_loader_win.cc index 21f54f5..23ed0ab 100644 --- a/chrome/browser/extensions/external_registry_loader_win.cc +++ b/chrome/browser/extensions/external_registry_loader_win.cc @@ -56,11 +56,11 @@ void ExternalRegistryLoader::LoadOnFileThread() { // A map of IDs, to weed out duplicates between HKCU and HKLM. std::set<string16> keys; base::win::RegistryKeyIterator iterator_machine_key( - HKEY_LOCAL_MACHINE, base::ASCIIToWide(kRegistryExtensions).c_str()); + HKEY_LOCAL_MACHINE, ASCIIToWide(kRegistryExtensions).c_str()); for (; iterator_machine_key.Valid(); ++iterator_machine_key) keys.insert(iterator_machine_key.Name()); base::win::RegistryKeyIterator iterator_user_key( - HKEY_CURRENT_USER, base::ASCIIToWide(kRegistryExtensions).c_str()); + HKEY_CURRENT_USER, ASCIIToWide(kRegistryExtensions).c_str()); for (; iterator_user_key.Valid(); ++iterator_user_key) keys.insert(iterator_user_key.Name()); @@ -70,7 +70,7 @@ void ExternalRegistryLoader::LoadOnFileThread() { for (std::set<string16>::const_iterator it = keys.begin(); it != keys.end(); ++it) { base::win::RegKey key; - string16 key_path = base::ASCIIToWide(kRegistryExtensions); + string16 key_path = ASCIIToWide(kRegistryExtensions); key_path.append(L"\\"); key_path.append(*it); if (key.Open(HKEY_LOCAL_MACHINE, @@ -124,7 +124,7 @@ void ExternalRegistryLoader::LoadOnFileThread() { continue; } - std::string id = base::WideToASCII(*it); + std::string id = WideToASCII(*it); StringToLowerASCII(&id); if (!Extension::IdIsValid(id)) { LOG(ERROR) << "Invalid id value " << id @@ -132,7 +132,7 @@ void ExternalRegistryLoader::LoadOnFileThread() { continue; } - Version version(base::WideToASCII(extension_version)); + Version version(WideToASCII(extension_version)); if (!version.IsValid()) { LOG(ERROR) << "Invalid version value " << extension_version << " for key " << key_path << "."; @@ -141,7 +141,7 @@ void ExternalRegistryLoader::LoadOnFileThread() { prefs->SetString( id + "." + ExternalProviderImpl::kExternalVersion, - base::WideToASCII(extension_version)); + WideToASCII(extension_version)); prefs->SetString( id + "." + ExternalProviderImpl::kExternalCrx, extension_path_str); diff --git a/chrome/browser/extensions/page_action_browsertest.cc b/chrome/browser/extensions/page_action_browsertest.cc index aa8262ff..75a4525 100644 --- a/chrome/browser/extensions/page_action_browsertest.cc +++ b/chrome/browser/extensions/page_action_browsertest.cc @@ -190,13 +190,13 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationPageAction) { ASSERT_EQ(size_before + 1, service->extensions()->size()); - EXPECT_STREQ(base::WideToUTF8(L"Hreggvi\u00F0ur: l10n page action").c_str(), + EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur: l10n page action").c_str(), extension->description().c_str()); - EXPECT_STREQ(base::WideToUTF8(L"Hreggvi\u00F0ur is my name").c_str(), + EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur is my name").c_str(), extension->name().c_str()); int tab_id = ExtensionTabUtil::GetTabId( browser()->tab_strip_model()->GetActiveWebContents()); - EXPECT_STREQ(base::WideToUTF8(L"Hreggvi\u00F0ur").c_str(), + EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur").c_str(), ExtensionActionManager::Get(browser()->profile())-> GetPageAction(*extension)-> GetTitle(tab_id).c_str()); diff --git a/chrome/browser/extensions/sandboxed_unpacker.cc b/chrome/browser/extensions/sandboxed_unpacker.cc index 9dfba7a..d772d2a 100644 --- a/chrome/browser/extensions/sandboxed_unpacker.cc +++ b/chrome/browser/extensions/sandboxed_unpacker.cc @@ -749,7 +749,7 @@ bool SandboxedUnpacker::RewriteCatalogFiles() { // TODO(viettrungluu): Fix the |FilePath::FromWStringHack(UTF8ToWide())| // hack and remove the corresponding #include. base::FilePath relative_path = - base::FilePath::FromWStringHack(base::UTF8ToWide(*key_it)); + base::FilePath::FromWStringHack(UTF8ToWide(*key_it)); relative_path = relative_path.Append(Extension::kMessagesFilename); if (relative_path.IsAbsolute() || relative_path.ReferencesParent()) { // Invalid path for catalog. |