diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-24 20:27:04 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-24 20:27:04 +0000 |
commit | 5f0cebb46d66ef0a1996594d0846c0067a8cf475 (patch) | |
tree | 5b3204961a403e7396fe48b45930b5b6528839f0 /chrome/common/service_process_util_win.cc | |
parent | 20023a76c3ffa049c35f86263fbf6ee4bbf00ade (diff) | |
download | chromium_src-5f0cebb46d66ef0a1996594d0846c0067a8cf475.zip chromium_src-5f0cebb46d66ef0a1996594d0846c0067a8cf475.tar.gz chromium_src-5f0cebb46d66ef0a1996594d0846c0067a8cf475.tar.bz2 |
Add utf_string_conversions to base namespace.
This adds "using"s for all functions so those can be fixed in a separate pass.
This converts the "Wide" versions of the functions in the Chrome directory as a first pass on the changeover.
BUG=
Review URL: https://codereview.chromium.org/12314090
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/service_process_util_win.cc')
-rw-r--r-- | chrome/common/service_process_util_win.cc | 18 |
1 files changed, 10 insertions, 8 deletions
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() { |