diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/child_process_logging_mac.mm | 2 | ||||
-rw-r--r-- | chrome/common/child_process_logging_posix.cc | 2 | ||||
-rw-r--r-- | chrome/common/child_process_logging_win.cc | 10 | ||||
-rw-r--r-- | chrome/common/extensions/extension.cc | 16 | ||||
-rw-r--r-- | chrome/common/extensions/extension_file_util.cc | 2 | ||||
-rw-r--r-- | chrome/common/extensions/extension_file_util_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/common/json_value_serializer_unittest.cc | 4 | ||||
-rw-r--r-- | chrome/common/logging_chrome.cc | 4 | ||||
-rw-r--r-- | chrome/common/service_process_util.cc | 2 | ||||
-rw-r--r-- | chrome/common/service_process_util_unittest.cc | 4 | ||||
-rw-r--r-- | chrome/common/service_process_util_win.cc | 18 |
12 files changed, 36 insertions, 32 deletions
diff --git a/chrome/common/child_process_logging_mac.mm b/chrome/common/child_process_logging_mac.mm index 39c05cd..7dd5380 100644 --- a/chrome/common/child_process_logging_mac.mm +++ b/chrome/common/child_process_logging_mac.mm @@ -95,7 +95,7 @@ void SetClientId(const std::string& client_id) { base::strlcpy(g_client_id, str.c_str(), kClientIdSize); SetClientIdImpl(str, SetCrashKeyValue); - std::wstring wstr = ASCIIToWide(str); + std::wstring wstr = base::ASCIIToWide(str); GoogleUpdateSettings::SetMetricsId(wstr); } diff --git a/chrome/common/child_process_logging_posix.cc b/chrome/common/child_process_logging_posix.cc index 39544b0..03ae371 100644 --- a/chrome/common/child_process_logging_posix.cc +++ b/chrome/common/child_process_logging_posix.cc @@ -72,7 +72,7 @@ void SetClientId(const std::string& client_id) { return; base::strlcpy(g_client_id, str.c_str(), kClientIdSize); - std::wstring wstr = ASCIIToWide(str); + std::wstring wstr = base::ASCIIToWide(str); GoogleUpdateSettings::SetMetricsId(wstr); } diff --git a/chrome/common/child_process_logging_win.cc b/chrome/common/child_process_logging_win.cc index 4d7ab12..0832676 100644 --- a/chrome/common/child_process_logging_win.cc +++ b/chrome/common/child_process_logging_win.cc @@ -80,7 +80,7 @@ void SetActiveURL(const GURL& url) { return; } - (set_active_url)(UTF8ToWide(url.possibly_invalid_spec()).c_str()); + (set_active_url)(base::UTF8ToWide(url.possibly_invalid_spec()).c_str()); } void SetClientId(const std::string& client_id) { @@ -91,7 +91,7 @@ void SetClientId(const std::string& client_id) { if (str.empty()) return; - std::wstring wstr = ASCIIToWide(str); + std::wstring wstr = base::ASCIIToWide(str); std::wstring old_wstr; if (!GoogleUpdateSettings::GetMetricsId(&old_wstr) || wstr != old_wstr) @@ -114,7 +114,7 @@ void SetClientId(const std::string& client_id) { std::string GetClientId() { std::wstring wstr_client_id; if (GoogleUpdateSettings::GetMetricsId(&wstr_client_id)) - return WideToASCII(wstr_client_id); + return base::WideToASCII(wstr_client_id); else return std::string(); } @@ -149,7 +149,7 @@ void SetActiveExtensions(const std::set<std::string>& extension_ids) { std::set<std::string>::const_iterator iter = extension_ids.begin(); for (size_t i = 0; i < kMaxReportedActiveExtensions; ++i) { if (iter != extension_ids.end()) { - (set_extension_id)(i, ASCIIToWide(iter->c_str()).c_str()); + (set_extension_id)(i, base::ASCIIToWide(iter->c_str()).c_str()); ++iter; } else { (set_extension_id)(i, L""); @@ -189,7 +189,7 @@ void SetPrinterInfo(const char* printer_info) { if (!set_printer_info) return; } - (set_printer_info)(UTF8ToWide(printer_info).c_str()); + (set_printer_info)(base::UTF8ToWide(printer_info).c_str()); } void SetCommandLine(const CommandLine* command_line) { diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index b8f18f7..a3fa24b 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -387,7 +387,7 @@ ExtensionResource Extension::GetResource( #if defined(OS_POSIX) base::FilePath relative_file_path(new_path); #elif defined(OS_WIN) - base::FilePath relative_file_path(UTF8ToWide(new_path)); + base::FilePath relative_file_path(base::UTF8ToWide(new_path)); #endif ExtensionResource r(id(), path(), relative_file_path); if ((creation_flags() & Extension::FOLLOW_SYMLINKS_ANYWHERE)) { @@ -790,14 +790,14 @@ bool Extension::ShowConfigureContextMenus() const { std::set<base::FilePath> Extension::GetBrowserImages() const { std::set<base::FilePath> image_paths; - // TODO(viettrungluu): These |FilePath::FromWStringHack(UTF8ToWide())| + // TODO(viettrungluu): These |FilePath::FromWStringHack(base::UTF8ToWide())| // indicate that we're doing something wrong. // Extension icons. for (ExtensionIconSet::IconMap::const_iterator iter = icons().map().begin(); iter != icons().map().end(); ++iter) { image_paths.insert( - base::FilePath::FromWStringHack(UTF8ToWide(iter->second))); + base::FilePath::FromWStringHack(base::UTF8ToWide(iter->second))); } // Theme images. @@ -806,8 +806,10 @@ std::set<base::FilePath> Extension::GetBrowserImages() const { for (DictionaryValue::Iterator it(*theme_images); !it.IsAtEnd(); it.Advance()) { std::string val; - if (it.value().GetAsString(&val)) - image_paths.insert(base::FilePath::FromWStringHack(UTF8ToWide(val))); + if (it.value().GetAsString(&val)) { + image_paths.insert(base::FilePath::FromWStringHack( + base::UTF8ToWide(val))); + } } } @@ -818,7 +820,7 @@ std::set<base::FilePath> Extension::GetBrowserImages() const { iter != page_action_info->default_icon.map().end(); ++iter) { image_paths.insert( - base::FilePath::FromWStringHack(UTF8ToWide(iter->second))); + base::FilePath::FromWStringHack(base::UTF8ToWide(iter->second))); } } @@ -829,7 +831,7 @@ std::set<base::FilePath> Extension::GetBrowserImages() const { iter != browser_action->default_icon.map().end(); ++iter) { image_paths.insert( - base::FilePath::FromWStringHack(UTF8ToWide(iter->second))); + base::FilePath::FromWStringHack(base::UTF8ToWide(iter->second))); } } diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc index 0a3a36b..589c8a2 100644 --- a/chrome/common/extensions/extension_file_util.cc +++ b/chrome/common/extensions/extension_file_util.cc @@ -707,7 +707,7 @@ base::FilePath ExtensionURLToRelativeFilePath(const GURL& url) { #if defined(OS_POSIX) base::FilePath(file_path); #elif defined(OS_WIN) - base::FilePath(UTF8ToWide(file_path)); + base::FilePath(base::UTF8ToWide(file_path)); #else base::FilePath(); NOTIMPLEMENTED(); diff --git a/chrome/common/extensions/extension_file_util_unittest.cc b/chrome/common/extensions/extension_file_util_unittest.cc index dc3fd3b..231dfd76 100644 --- a/chrome/common/extensions/extension_file_util_unittest.cc +++ b/chrome/common/extensions/extension_file_util_unittest.cc @@ -300,7 +300,7 @@ TEST_F(ExtensionFileUtilTest, ExtensionURLToRelativeFilePath) { base::FilePath expected_path(test_cases[i].expected_relative_path); #elif defined(OS_WIN) base::FilePath expected_path( - UTF8ToWide(test_cases[i].expected_relative_path)); + base::UTF8ToWide(test_cases[i].expected_relative_path)); #endif base::FilePath actual_path = diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc index 656dd0f..347a899 100644 --- a/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc +++ b/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc @@ -164,7 +164,7 @@ TEST_F(InitValueManifestTest, InitFromValueValidNameInRTL) { // Strong RTL characters in name. extension = LoadAndExpectSuccess("init_valid_name_strong_rtl.json"); - localized_name = WideToUTF16(L"Dictionary (\x05D1\x05D2"L" Google)"); + localized_name = base::WideToUTF16(L"Dictionary (\x05D1\x05D2"L" Google)"); base::i18n::AdjustStringForLocaleDirection(&localized_name); EXPECT_EQ(localized_name, UTF8ToUTF16(extension->name())); diff --git a/chrome/common/json_value_serializer_unittest.cc b/chrome/common/json_value_serializer_unittest.cc index 46f45ab..39e2359 100644 --- a/chrome/common/json_value_serializer_unittest.cc +++ b/chrome/common/json_value_serializer_unittest.cc @@ -122,7 +122,7 @@ TEST(JSONValueSerializerTest, StringEscape) { TEST(JSONValueSerializerTest, UnicodeStrings) { // unicode string json -> escaped ascii text DictionaryValue root; - string16 test(WideToUTF16(L"\x7F51\x9875")); + string16 test(base::WideToUTF16(L"\x7F51\x9875")); root.SetString("web", test); std::string expected = "{\"web\":\"\\u7F51\\u9875\"}"; @@ -146,7 +146,7 @@ TEST(JSONValueSerializerTest, UnicodeStrings) { TEST(JSONValueSerializerTest, HexStrings) { // hex string json -> escaped ascii text DictionaryValue root; - string16 test(WideToUTF16(L"\x01\x02")); + string16 test(base::WideToUTF16(L"\x01\x02")); root.SetString("test", test); std::string expected = "{\"test\":\"\\u0001\\u0002\"}"; diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc index 896cc7b..fbfdfc9 100644 --- a/chrome/common/logging_chrome.cc +++ b/chrome/common/logging_chrome.cc @@ -383,7 +383,7 @@ base::FilePath GetLogFileName() { scoped_ptr<base::Environment> env(base::Environment::Create()); if (env->GetVar(env_vars::kLogFileName, &filename) && !filename.empty()) { #if defined(OS_WIN) - return base::FilePath(UTF8ToWide(filename)); + return base::FilePath(base::UTF8ToWide(filename)); #elif defined(OS_POSIX) return base::FilePath(filename); #endif @@ -422,7 +422,7 @@ size_t GetFatalAssertions(AssertionList* assertions) { while (!log_file.eof()) { getline(log_file, utf8_line); if (utf8_line.find(":FATAL:") != std::string::npos) { - wide_line = UTF8ToWide(utf8_line); + wide_line = base::UTF8ToWide(utf8_line); if (assertions) assertions->push_back(wide_line); ++assertion_count; diff --git a/chrome/common/service_process_util.cc b/chrome/common/service_process_util.cc index bed0614..0a33e38 100644 --- a/chrome/common/service_process_util.cc +++ b/chrome/common/service_process_util.cc @@ -107,7 +107,7 @@ std::string GetServiceProcessScopedName(const std::string& append_str) { base::FilePath user_data_dir; PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); #if defined(OS_WIN) - std::string user_data_dir_path = WideToUTF8(user_data_dir.value()); + std::string user_data_dir_path = base::WideToUTF8(user_data_dir.value()); #elif defined(OS_POSIX) std::string user_data_dir_path = user_data_dir.value(); #endif // defined(OS_WIN) diff --git a/chrome/common/service_process_util_unittest.cc b/chrome/common/service_process_util_unittest.cc index 8322c5d..0ead384 100644 --- a/chrome/common/service_process_util_unittest.cc +++ b/chrome/common/service_process_util_unittest.cc @@ -125,7 +125,7 @@ TEST_F(ServiceProcessStateTest, AutoRun) { std::string value_name = GetServiceProcessScopedName("_service_run"); string16 value; EXPECT_TRUE(base::win::ReadCommandFromAutoRun(HKEY_CURRENT_USER, - UTF8ToWide(value_name), + base::UTF8ToWide(value_name), &value)); autorun_command_line.reset(new CommandLine(CommandLine::FromString(value))); #elif defined(OS_POSIX) && !defined(OS_MACOSX) @@ -155,7 +155,7 @@ TEST_F(ServiceProcessStateTest, AutoRun) { ASSERT_TRUE(state.RemoveFromAutoRun()); #if defined(OS_WIN) EXPECT_FALSE(base::win::ReadCommandFromAutoRun(HKEY_CURRENT_USER, - UTF8ToWide(value_name), + base::UTF8ToWide(value_name), &value)); #elif defined(OS_POSIX) && !defined(OS_MACOSX) EXPECT_FALSE(AutoStart::GetAutostartFileValue( diff --git a/chrome/common/service_process_util_win.cc b/chrome/common/service_process_util_win.cc index dfa2fc4..486740b 100644 --- a/chrome/common/service_process_util_win.cc +++ b/chrome/common/service_process_util_win.cc @@ -23,12 +23,12 @@ namespace { const char* kTerminateEventSuffix = "_service_terminate_evt"; string16 GetServiceProcessReadyEventName() { - return UTF8ToWide( + return base::UTF8ToWide( GetServiceProcessScopedVersionedName("_service_ready")); } string16 GetServiceProcessTerminateEventName() { - return UTF8ToWide( + return base::UTF8ToWide( GetServiceProcessScopedVersionedName(kTerminateEventSuffix)); } @@ -41,7 +41,7 @@ std::string GetServiceProcessAutoRunKey() { std::string GetObsoleteServiceProcessAutoRunKey() { base::FilePath user_data_dir; PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); - std::string scoped_name = WideToUTF8(user_data_dir.value()); + std::string scoped_name = base::WideToUTF8(user_data_dir.value()); std::replace(scoped_name.begin(), scoped_name.end(), '\\', '!'); std::replace(scoped_name.begin(), scoped_name.end(), '/', '!'); scoped_name.append("_service_run"); @@ -88,7 +88,7 @@ bool ForceServiceProcessShutdown(const std::string& version, std::string versioned_name = version; versioned_name.append(kTerminateEventSuffix); string16 event_name = - UTF8ToWide(GetServiceProcessScopedName(versioned_name)); + base::UTF8ToWide(GetServiceProcessScopedName(versioned_name)); terminate_event.Set(OpenEvent(EVENT_MODIFY_STATE, FALSE, event_name.c_str())); if (!terminate_event.IsValid()) return false; @@ -153,10 +153,11 @@ bool ServiceProcessState::AddToAutoRun() { // Remove the old autorun value first because we changed the naming scheme // for the autorun value name. base::win::RemoveCommandFromAutoRun( - HKEY_CURRENT_USER, UTF8ToWide(GetObsoleteServiceProcessAutoRunKey())); + HKEY_CURRENT_USER, + base::UTF8ToWide(GetObsoleteServiceProcessAutoRunKey())); return base::win::AddCommandToAutoRun( HKEY_CURRENT_USER, - UTF8ToWide(GetServiceProcessAutoRunKey()), + base::UTF8ToWide(GetServiceProcessAutoRunKey()), autorun_command_line_->GetCommandLineString()); } @@ -164,9 +165,10 @@ bool ServiceProcessState::RemoveFromAutoRun() { // Remove the old autorun value first because we changed the naming scheme // for the autorun value name. base::win::RemoveCommandFromAutoRun( - HKEY_CURRENT_USER, UTF8ToWide(GetObsoleteServiceProcessAutoRunKey())); + HKEY_CURRENT_USER, + base::UTF8ToWide(GetObsoleteServiceProcessAutoRunKey())); return base::win::RemoveCommandFromAutoRun( - HKEY_CURRENT_USER, UTF8ToWide(GetServiceProcessAutoRunKey())); + HKEY_CURRENT_USER, base::UTF8ToWide(GetServiceProcessAutoRunKey())); } void ServiceProcessState::TearDownState() { |