diff options
Diffstat (limited to 'remoting/host')
26 files changed, 66 insertions, 57 deletions
diff --git a/remoting/host/clipboard_win.cc b/remoting/host/clipboard_win.cc index 03d6044..dfb6270 100644 --- a/remoting/host/clipboard_win.cc +++ b/remoting/host/clipboard_win.cc @@ -195,7 +195,7 @@ void ClipboardWin::InjectClipboardEvent( return; } - base::string16 text = UTF8ToUTF16(ReplaceLfByCrLf(event.data())); + base::string16 text = base::UTF8ToUTF16(ReplaceLfByCrLf(event.data())); ScopedClipboard clipboard; if (!clipboard.Init(window_->hwnd())) { @@ -252,7 +252,7 @@ void ClipboardWin::OnClipboardUpdate() { protocol::ClipboardEvent event; event.set_mime_type(kMimeTypeTextUtf8); - event.set_data(ReplaceCrLfByLf(UTF16ToUTF8(text))); + event.set_data(ReplaceCrLfByLf(base::UTF16ToUTF8(text))); if (client_clipboard_.get()) { client_clipboard_->InjectClipboardEvent(event); diff --git a/remoting/host/desktop_session_win.cc b/remoting/host/desktop_session_win.cc index 8691d0e..77e024f 100644 --- a/remoting/host/desktop_session_win.cc +++ b/remoting/host/desktop_session_win.cc @@ -256,7 +256,7 @@ bool RdpSession::Initialize(const ScreenResolution& resolution) { base::win::ScopedComPtr<IRdpDesktopSessionEventHandler> event_handler( new EventHandler(weak_factory_.GetWeakPtr())); terminal_id_ = base::GenerateGUID(); - base::win::ScopedBstr terminal_id(UTF8ToUTF16(terminal_id_).c_str()); + base::win::ScopedBstr terminal_id(base::UTF8ToUTF16(terminal_id_).c_str()); result = rdp_desktop_session_->Connect(host_size.width(), host_size.height(), terminal_id, @@ -544,7 +544,8 @@ void DesktopSessionWin::OnSessionAttached(uint32 session_id) { new WtsSessionProcessDelegate(io_task_runner_, target.Pass(), launch_elevated, - WideToUTF8(kDaemonIpcSecurityDescriptor))); + base::WideToUTF8( + kDaemonIpcSecurityDescriptor))); if (!delegate->Initialize(session_id)) { TerminateSession(); return; diff --git a/remoting/host/disconnect_window_gtk.cc b/remoting/host/disconnect_window_gtk.cc index 5b840e0..34c2683 100644 --- a/remoting/host/disconnect_window_gtk.cc +++ b/remoting/host/disconnect_window_gtk.cc @@ -161,7 +161,7 @@ void DisconnectWindowGtk::Start( // Extract the user name from the JID. std::string client_jid = client_session_control_->client_jid(); base::string16 username = - UTF8ToUTF16(client_jid.substr(0, client_jid.find('/'))); + base::UTF8ToUTF16(client_jid.substr(0, client_jid.find('/'))); gtk_label_set_text( GTK_LABEL(message_), l10n_util::GetStringFUTF8(IDR_MESSAGE_SHARED, username).c_str()); diff --git a/remoting/host/disconnect_window_mac.mm b/remoting/host/disconnect_window_mac.mm index 9cb170a..e58ae1c 100644 --- a/remoting/host/disconnect_window_mac.mm +++ b/remoting/host/disconnect_window_mac.mm @@ -86,7 +86,7 @@ scoped_ptr<HostWindow> HostWindow::CreateDisconnectWindow() { self = [super initWithWindowNibName:@"disconnect_window"]; if (self) { disconnect_callback_ = disconnect_callback; - username_ = UTF8ToUTF16(username); + username_ = base::UTF8ToUTF16(username); } return self; } diff --git a/remoting/host/disconnect_window_win.cc b/remoting/host/disconnect_window_win.cc index 59c8c24..07eeabc 100644 --- a/remoting/host/disconnect_window_win.cc +++ b/remoting/host/disconnect_window_win.cc @@ -316,7 +316,8 @@ bool DisconnectWindowWin::SetStrings() { } // Format and truncate "Your desktop is shared with ..." message. - message_text = ReplaceStringPlaceholders(message_text, UTF8ToUTF16(username_), + message_text = ReplaceStringPlaceholders(message_text, + base::UTF8ToUTF16(username_), NULL); if (message_text.length() > kMaxSharingWithTextLength) message_text.erase(kMaxSharingWithTextLength); diff --git a/remoting/host/host_event_logger_win.cc b/remoting/host/host_event_logger_win.cc index 6fd5b6b..a9e22ad 100644 --- a/remoting/host/host_event_logger_win.cc +++ b/remoting/host/host_event_logger_win.cc @@ -60,8 +60,8 @@ HostEventLoggerWin::HostEventLoggerWin(base::WeakPtr<HostStatusMonitor> monitor, const std::string& application_name) : monitor_(monitor), event_log_(NULL) { - event_log_ = RegisterEventSourceW(NULL, - UTF8ToUTF16(application_name).c_str()); + event_log_ = RegisterEventSourceW( + NULL, base::UTF8ToUTF16(application_name).c_str()); if (event_log_ != NULL) { monitor_->AddStatusObserver(this); } else { @@ -122,7 +122,7 @@ void HostEventLoggerWin::Log(WORD type, std::vector<const WCHAR*> raw_strings(strings.size()); std::vector<base::string16> utf16_strings(strings.size()); for (size_t i = 0; i < strings.size(); ++i) { - utf16_strings[i] = UTF8ToUTF16(strings[i]); + utf16_strings[i] = base::UTF8ToUTF16(strings[i]); raw_strings[i] = utf16_strings[i].c_str(); } diff --git a/remoting/host/host_main.cc b/remoting/host/host_main.cc index 7c9fb16..a3d163e 100644 --- a/remoting/host/host_main.cc +++ b/remoting/host/host_main.cc @@ -217,7 +217,7 @@ int HostMain(int argc, char** argv) { CommandLine::StringVector args = command_line->GetArgs(); if (!args.empty()) { #if defined(OS_WIN) - std::string origin = UTF16ToUTF8(args[0]); + std::string origin = base::UTF16ToUTF8(args[0]); #else std::string origin = args[0]; #endif diff --git a/remoting/host/ipc_util_win.cc b/remoting/host/ipc_util_win.cc index 3325be5..a8c28db 100644 --- a/remoting/host/ipc_util_win.cc +++ b/remoting/host/ipc_util_win.cc @@ -39,7 +39,7 @@ bool CreateConnectedIpcChannel( // to the network process. It gives full access to the account that // the calling code is running under and denies access by anyone else. std::string security_descriptor = base::StringPrintf( - "O:%1$sG:%1$sD:(A;;GA;;;%1$s)", WideToUTF8(user_sid).c_str()); + "O:%1$sG:%1$sD:(A;;GA;;;%1$s)", base::WideToUTF8(user_sid).c_str()); // Generate a unique name for the channel. std::string channel_name = IPC::Channel::GenerateUniqueRandomChannelID(); @@ -69,7 +69,7 @@ bool CreateConnectedIpcChannel( // Create the client end of the channel. This code should match the code in // IPC::Channel. ScopedHandle client; - client.Set(CreateFile(UTF8ToUTF16(pipe_name).c_str(), + client.Set(CreateFile(base::UTF8ToUTF16(pipe_name).c_str(), GENERIC_READ | GENERIC_WRITE, 0, &security_attributes, @@ -112,7 +112,7 @@ bool CreateIpcChannel( // IPC::Channel with exception of passing a non-default security descriptor. base::win::ScopedHandle pipe; pipe.Set(CreateNamedPipe( - UTF8ToUTF16(pipe_name).c_str(), + base::UTF8ToUTF16(pipe_name).c_str(), PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED | FILE_FLAG_FIRST_PIPE_INSTANCE, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE, 1, diff --git a/remoting/host/pairing_registry_delegate_win.cc b/remoting/host/pairing_registry_delegate_win.cc index 20230d0..7987f1c 100644 --- a/remoting/host/pairing_registry_delegate_win.cc +++ b/remoting/host/pairing_registry_delegate_win.cc @@ -48,7 +48,7 @@ scoped_ptr<base::DictionaryValue> ReadValue(const base::win::RegKey& key, } // Parse the value. - std::string value_json_utf8 = WideToUTF8(value_json); + std::string value_json_utf8 = base::WideToUTF8(value_json); JSONStringValueSerializer serializer(&value_json_utf8); int error_code; std::string error_message; @@ -82,7 +82,7 @@ bool WriteValue(base::win::RegKey& key, } // presubmit: allow wstring - std::wstring value_json = UTF8ToWide(value_json_utf8); + std::wstring value_json = base::UTF8ToWide(value_json_utf8); LONG result = key.WriteValue(value_name, value_json.c_str()); if (result != ERROR_SUCCESS) { SetLastError(result); @@ -135,7 +135,7 @@ scoped_ptr<base::ListValue> PairingRegistryDelegateWin::LoadAll() { continue; } - PairingRegistry::Pairing pairing = Load(WideToUTF8(value_name)); + PairingRegistry::Pairing pairing = Load(base::WideToUTF8(value_name)); if (pairing.is_valid()) pairings->Append(pairing.ToValue().release()); } @@ -168,7 +168,7 @@ bool PairingRegistryDelegateWin::DeleteAll() { PairingRegistry::Pairing PairingRegistryDelegateWin::Load( const std::string& client_id) { // presubmit: allow wstring - std::wstring value_name = UTF8ToWide(client_id); + std::wstring value_name = base::UTF8ToWide(client_id); // Read unprivileged fields first. scoped_ptr<base::DictionaryValue> pairing = ReadValue(unprivileged_, @@ -207,7 +207,7 @@ bool PairingRegistryDelegateWin::Save(const PairingRegistry::Pairing& pairing) { secret_json->Set(PairingRegistry::kSharedSecretKey, secret_key.release()); // presubmit: allow wstring - std::wstring value_name = UTF8ToWide(pairing.client_id()); + std::wstring value_name = base::UTF8ToWide(pairing.client_id()); // Write pairing to the registry. if (!WriteValue(privileged_, value_name.c_str(), secret_json.Pass()) || @@ -226,7 +226,7 @@ bool PairingRegistryDelegateWin::Delete(const std::string& client_id) { } // presubmit: allow wstring - std::wstring value_name = UTF8ToWide(client_id); + std::wstring value_name = base::UTF8ToWide(client_id); LONG result = privileged_.DeleteValue(value_name.c_str()); if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND && diff --git a/remoting/host/pairing_registry_delegate_win_unittest.cc b/remoting/host/pairing_registry_delegate_win_unittest.cc index b8b3953..991ac8f 100644 --- a/remoting/host/pairing_registry_delegate_win_unittest.cc +++ b/remoting/host/pairing_registry_delegate_win_unittest.cc @@ -22,7 +22,8 @@ class PairingRegistryDelegateWinTest : public testing::Test { key_name_ = base::GenerateGUID(); base::win::RegKey root; - EXPECT_TRUE(root.Create(HKEY_CURRENT_USER, UTF8ToWide(key_name_).c_str(), + EXPECT_TRUE(root.Create(HKEY_CURRENT_USER, + base::UTF8ToWide(key_name_).c_str(), KEY_READ | KEY_WRITE) == ERROR_SUCCESS); EXPECT_TRUE(privileged_.Create(root.Handle(), L"privileged", @@ -34,8 +35,9 @@ class PairingRegistryDelegateWinTest : public testing::Test { virtual void TearDown() OVERRIDE { privileged_.Close(); unprivileged_.Close(); - EXPECT_TRUE(SHDeleteKey(HKEY_CURRENT_USER, - UTF8ToWide(key_name_).c_str()) == ERROR_SUCCESS); + EXPECT_TRUE( + SHDeleteKey(HKEY_CURRENT_USER, + base::UTF8ToWide(key_name_).c_str()) == ERROR_SUCCESS); } protected: diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc index 288b240..456ca50 100644 --- a/remoting/host/plugin/host_script_object.cc +++ b/remoting/host/plugin/host_script_object.cc @@ -939,7 +939,7 @@ void HostNPScriptObject::LocalizeStrings(NPObject* localize_func) { #if !defined(OS_WIN) base::string16 ui_locale; LocalizeString(localize_func, "@@ui_locale", &ui_locale); - remoting::LoadResources(UTF16ToUTF8(ui_locale)); + remoting::LoadResources(base::UTF16ToUTF8(ui_locale)); #endif // !defined(OS_WIN) } @@ -973,7 +973,7 @@ bool HostNPScriptObject::LocalizeStringWithSubstitution( LOG(ERROR) << "Missing translation for " << tag; return false; } - *result = UTF8ToUTF16(translation); + *result = base::UTF8ToUTF16(translation); return true; } diff --git a/remoting/host/policy_hack/policy_watcher_win.cc b/remoting/host/policy_hack/policy_watcher_win.cc index 83f67430..89816d4 100644 --- a/remoting/host/policy_hack/policy_watcher_win.cc +++ b/remoting/host/policy_hack/policy_watcher_win.cc @@ -115,13 +115,13 @@ class PolicyWatcherWin : bool GetRegistryPolicyString(const std::string& value_name, std::string* result) const { // presubmit: allow wstring - std::wstring value_name_wide = UTF8ToWide(value_name); + std::wstring value_name_wide = base::UTF8ToWide(value_name); // presubmit: allow wstring std::wstring value; RegKey policy_key(HKEY_LOCAL_MACHINE, kRegistrySubKey, KEY_READ); if (policy_key.ReadValue(value_name_wide.c_str(), &value) == ERROR_SUCCESS) { - *result = WideToUTF8(value); + *result = base::WideToUTF8(value); return true; } @@ -129,7 +129,7 @@ class PolicyWatcherWin : ERROR_SUCCESS) { if (policy_key.ReadValue(value_name_wide.c_str(), &value) == ERROR_SUCCESS) { - *result = WideToUTF8(value); + *result = base::WideToUTF8(value); return true; } } @@ -139,7 +139,7 @@ class PolicyWatcherWin : bool GetRegistryPolicyInteger(const std::string& value_name, uint32* result) const { // presubmit: allow wstring - std::wstring value_name_wide = UTF8ToWide(value_name); + std::wstring value_name_wide = base::UTF8ToWide(value_name); DWORD value = 0; RegKey policy_key(HKEY_LOCAL_MACHINE, kRegistrySubKey, KEY_READ); if (policy_key.ReadValueDW(value_name_wide.c_str(), &value) == diff --git a/remoting/host/setup/daemon_controller_delegate_win.cc b/remoting/host/setup/daemon_controller_delegate_win.cc index 74f5846..2070c49 100644 --- a/remoting/host/setup/daemon_controller_delegate_win.cc +++ b/remoting/host/setup/daemon_controller_delegate_win.cc @@ -58,7 +58,7 @@ const int kUnprivilegedTimeoutSec = 60; void ConfigToString(const base::DictionaryValue& config, ScopedBstr* out) { std::string config_str; base::JSONWriter::Write(&config, &config_str); - ScopedBstr config_scoped_bstr(UTF8ToUTF16(config_str).c_str()); + ScopedBstr config_scoped_bstr(base::UTF8ToUTF16(config_str).c_str()); out->Swap(config_scoped_bstr); } @@ -183,7 +183,7 @@ scoped_ptr<base::DictionaryValue> DaemonControllerDelegateWin::GetConfig() { base::string16 file_content( static_cast<BSTR>(host_config), host_config.Length()); scoped_ptr<base::Value> config( - base::JSONReader::Read(UTF16ToUTF8(file_content), + base::JSONReader::Read(base::UTF16ToUTF8(file_content), base::JSON_ALLOW_TRAILING_COMMAS)); if (!config || config->GetType() != base::Value::TYPE_DICTIONARY) @@ -278,7 +278,7 @@ std::string DaemonControllerDelegateWin::GetVersion() { if (FAILED(hr)) return std::string(); - return UTF16ToUTF8( + return base::UTF16ToUTF8( base::string16(static_cast<BSTR>(version), version.Length())); } diff --git a/remoting/host/setup/daemon_installer_win.cc b/remoting/host/setup/daemon_installer_win.cc index f7b7d35..f54b6d7 100644 --- a/remoting/host/setup/daemon_installer_win.cc +++ b/remoting/host/setup/daemon_installer_win.cc @@ -293,7 +293,7 @@ void DaemonCommandLineInstallerWin::Install() { } // Launch the updater process and wait for its termination. - base::string16 command_line = WideToUTF16( + base::string16 command_line = base::WideToUTF16( base::StringPrintf(kGoogleUpdateCommandLineFormat, google_update.c_str(), kHostOmahaAppid, diff --git a/remoting/host/setup/win/auth_code_getter.cc b/remoting/host/setup/win/auth_code_getter.cc index c680191..2fbb68d 100644 --- a/remoting/host/setup/win/auth_code_getter.cc +++ b/remoting/host/setup/win/auth_code_getter.cc @@ -38,7 +38,7 @@ void AuthCodeGetter::GetAuthCode( on_auth_code_.Run(""); return; } - base::win::ScopedBstr url(UTF8ToWide( + base::win::ScopedBstr url(base::UTF8ToWide( GetOauthStartUrl(GetDefaultOauthRedirectUrl())).c_str()); base::win::ScopedVariant empty_variant; hr = browser_->Navigate(url, empty_variant.AsInput(), empty_variant.AsInput(), @@ -76,7 +76,7 @@ bool AuthCodeGetter::TestBrowserUrl(std::string* auth_code) { KillBrowser(); return true; } - *auth_code = GetOauthCodeInUrl(WideToUTF8(static_cast<BSTR>(url)), + *auth_code = GetOauthCodeInUrl(base::WideToUTF8(static_cast<BSTR>(url)), GetDefaultOauthRedirectUrl()); if (!auth_code->empty()) { KillBrowser(); diff --git a/remoting/host/verify_config_window_win.cc b/remoting/host/verify_config_window_win.cc index df7a590..849d384 100644 --- a/remoting/host/verify_config_window_win.cc +++ b/remoting/host/verify_config_window_win.cc @@ -43,7 +43,7 @@ LRESULT VerifyConfigWindowWin::OnInitDialog(HWND wparam, LPARAM lparam) { CenterWindow(); CWindow email_text(GetDlgItem(IDC_EMAIL)); - email_text.SetWindowText(UTF8ToUTF16(email_).c_str()); + email_text.SetWindowText(base::UTF8ToUTF16(email_).c_str()); return TRUE; } @@ -114,7 +114,8 @@ bool VerifyConfigWindowWin::VerifyHostSecretHash() { int result = pin_edit.GetWindowText(pin.get(), pin_length + 1); pin[std::min(result, pin_length)] = 0; - return VerifyHostPinHash(host_secret_hash_, host_id_, UTF16ToUTF8(pin.get())); + return VerifyHostPinHash(host_secret_hash_, + host_id_, base::UTF16ToUTF8(pin.get())); } } // namespace remoting diff --git a/remoting/host/win/chromoting_module.cc b/remoting/host/win/chromoting_module.cc index 0e9f6b6..1d7a37e 100644 --- a/remoting/host/win/chromoting_module.cc +++ b/remoting/host/win/chromoting_module.cc @@ -204,7 +204,7 @@ int ElevatedControllerMain() { ChromotingModule module(elevated_controller_entry, elevated_controller_entry + 1); - if (!InitializeComSecurity(WideToUTF8(kElevatedControllerSd), "", true)) + if (!InitializeComSecurity(base::WideToUTF8(kElevatedControllerSd), "", true)) return kInitializationFailed; if (!module.Run()) diff --git a/remoting/host/win/elevated_controller.cc b/remoting/host/win/elevated_controller.cc index d2eea5e..d826dc9 100644 --- a/remoting/host/win/elevated_controller.cc +++ b/remoting/host/win/elevated_controller.cc @@ -322,7 +322,7 @@ STDMETHODIMP ElevatedController::GetConfig(BSTR* config_out) { std::string file_content; base::JSONWriter::Write(config.get(), &file_content); - *config_out = ::SysAllocString(UTF8ToUTF16(file_content).c_str()); + *config_out = ::SysAllocString(base::UTF8ToUTF16(file_content).c_str()); if (config_out == NULL) { return E_OUTOFMEMORY; } @@ -358,7 +358,7 @@ STDMETHODIMP ElevatedController::SetConfig(BSTR config) { return HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED); } - std::string file_content = UTF16ToUTF8( + std::string file_content = base::UTF16ToUTF8( base::string16(static_cast<base::char16*>(config), ::SysStringLen(config))); return WriteConfig(file_content.c_str(), file_content.size(), owner_window_); @@ -451,7 +451,7 @@ STDMETHODIMP ElevatedController::StopDaemon() { STDMETHODIMP ElevatedController::UpdateConfig(BSTR config) { // Parse the config. - std::string config_str = UTF16ToUTF8( + std::string config_str = base::UTF16ToUTF8( base::string16(static_cast<base::char16*>(config), ::SysStringLen(config))); scoped_ptr<base::Value> config_value(base::JSONReader::Read(config_str)); if (!config_value.get()) { diff --git a/remoting/host/win/host_service.cc b/remoting/host/win/host_service.cc index 1c7e199..8a9ff9e 100644 --- a/remoting/host/win/host_service.cc +++ b/remoting/host/win/host_service.cc @@ -272,8 +272,9 @@ void HostService::RunAsServiceImpl() { if (!com_initializer.succeeded()) return; - if (!InitializeComSecurity(WideToUTF8(kComProcessSd), - WideToUTF8(kComProcessMandatoryLabel), false)) { + if (!InitializeComSecurity(base::WideToUTF8(kComProcessSd), + base::WideToUTF8(kComProcessMandatoryLabel), + false)) { return; } @@ -308,8 +309,9 @@ int HostService::RunInConsole() { if (!com_initializer.succeeded()) return result; - if (!InitializeComSecurity(WideToUTF8(kComProcessSd), - WideToUTF8(kComProcessMandatoryLabel), false)) { + if (!InitializeComSecurity(base::WideToUTF8(kComProcessSd), + base::WideToUTF8(kComProcessMandatoryLabel), + false)) { return result; } diff --git a/remoting/host/win/launch_process_with_token.cc b/remoting/host/win/launch_process_with_token.cc index 6cb7e31..f7ce845 100644 --- a/remoting/host/win/launch_process_with_token.cc +++ b/remoting/host/win/launch_process_with_token.cc @@ -58,7 +58,8 @@ bool ConnectToExecutionServer(uint32 session_id, // Use winsta!WinStationQueryInformationW() to determine the process creation // pipe name for the session. - base::FilePath winsta_path(base::GetNativeLibraryName(UTF8ToUTF16("winsta"))); + base::FilePath winsta_path( + base::GetNativeLibraryName(base::UTF8ToUTF16("winsta"))); base::ScopedNativeLibrary winsta(winsta_path); if (winsta.is_valid()) { PWINSTATIONQUERYINFORMATIONW win_station_query_information = @@ -80,7 +81,7 @@ bool ConnectToExecutionServer(uint32 session_id, // Use the default pipe name if we couldn't query its name. if (pipe_name.empty()) { - pipe_name = UTF8ToUTF16( + pipe_name = base::UTF8ToUTF16( base::StringPrintf(kCreateProcessDefaultPipeNameFormat, session_id)); } diff --git a/remoting/host/win/rdp_client_window.cc b/remoting/host/win/rdp_client_window.cc index 9a2d366..fe3da3c 100644 --- a/remoting/host/win/rdp_client_window.cc +++ b/remoting/host/win/rdp_client_window.cc @@ -240,8 +240,8 @@ LRESULT RdpClientWindow::OnCreate(CREATESTRUCT* create_struct) { base::win::ScopedComPtr<mstsc::IMsTscSecuredSettings> secured_settings; base::win::ScopedComPtr<mstsc::IMsRdpClientSecuredSettings> secured_settings2; base::win::ScopedBstr server_name( - UTF8ToUTF16(server_endpoint_.ToStringWithoutPort()).c_str()); - base::win::ScopedBstr terminal_id(UTF8ToUTF16(terminal_id_).c_str()); + base::UTF8ToUTF16(server_endpoint_.ToStringWithoutPort()).c_str()); + base::win::ScopedBstr terminal_id(base::UTF8ToUTF16(terminal_id_).c_str()); // Create the child window that actually hosts the ActiveX control. RECT rect = { 0, 0, screen_size_.width(), screen_size_.height() }; diff --git a/remoting/host/win/rdp_desktop_session.cc b/remoting/host/win/rdp_desktop_session.cc index 73c3338..6f6d397 100644 --- a/remoting/host/win/rdp_desktop_session.cc +++ b/remoting/host/win/rdp_desktop_session.cc @@ -27,7 +27,7 @@ STDMETHODIMP RdpDesktopSession::Connect( client_.reset(new RdpClient(task_runner, task_runner, webrtc::DesktopSize(width, height), - UTF16ToUTF8(terminal_id), this)); + base::UTF16ToUTF8(terminal_id), this)); return S_OK; } diff --git a/remoting/host/win/security_descriptor.cc b/remoting/host/win/security_descriptor.cc index d6c7af0..572df45 100644 --- a/remoting/host/win/security_descriptor.cc +++ b/remoting/host/win/security_descriptor.cc @@ -15,7 +15,7 @@ ScopedSd ConvertSddlToSd(const std::string& sddl) { PSECURITY_DESCRIPTOR raw_sd = NULL; ULONG length = 0; if (!ConvertStringSecurityDescriptorToSecurityDescriptor( - UTF8ToUTF16(sddl).c_str(), SDDL_REVISION_1, &raw_sd, &length)) { + base::UTF8ToUTF16(sddl).c_str(), SDDL_REVISION_1, &raw_sd, &length)) { return ScopedSd(); } @@ -34,7 +34,7 @@ std::string ConvertSidToString(SID* sid) { base::string16 sid_string(c_sid_string); LocalFree(c_sid_string); - return UTF16ToUTF8(sid_string); + return base::UTF16ToUTF8(sid_string); } // Returns the logon SID of a token. Returns NULL if the token does not specify diff --git a/remoting/host/win/unprivileged_process_delegate.cc b/remoting/host/win/unprivileged_process_delegate.cc index 006b9e5..1457bd7 100644 --- a/remoting/host/win/unprivileged_process_delegate.cc +++ b/remoting/host/win/unprivileged_process_delegate.cc @@ -166,7 +166,7 @@ bool CreateWindowStationAndDesktop(ScopedSid logon_sid, WindowStationAndDesktop handles; handles.SetWindowStation(CreateWindowStation( - UTF8ToUTF16(window_station_name).c_str(), window_station_flags, + base::UTF8ToUTF16(window_station_name).c_str(), window_station_flags, desired_access, &security_attributes)); if (!handles.window_station()) { LOG_GETLASTERROR(ERROR) << "CreateWindowStation() failed"; diff --git a/remoting/host/win/wts_session_process_delegate.cc b/remoting/host/win/wts_session_process_delegate.cc index 0781649..f19b37d 100644 --- a/remoting/host/win/wts_session_process_delegate.cc +++ b/remoting/host/win/wts_session_process_delegate.cc @@ -387,7 +387,7 @@ void WtsSessionProcessDelegate::Core::DoLaunchProcess() { // Pass the name of the IPC channel to use. command_line.AppendSwitchNative(kDaemonPipeSwitchName, - UTF8ToWide(channel_name)); + base::UTF8ToWide(channel_name)); // Try to launch the process. ScopedHandle worker_process; @@ -399,7 +399,7 @@ void WtsSessionProcessDelegate::Core::DoLaunchProcess() { NULL, false, CREATE_SUSPENDED | CREATE_BREAKAWAY_FROM_JOB, - UTF8ToUTF16(kDefaultDesktopName).c_str(), + base::UTF8ToUTF16(kDefaultDesktopName).c_str(), &worker_process, &worker_thread)) { ReportFatalError(); diff --git a/remoting/host/win/wts_terminal_monitor.cc b/remoting/host/win/wts_terminal_monitor.cc index d9d3732..6c65479 100644 --- a/remoting/host/win/wts_terminal_monitor.cc +++ b/remoting/host/win/wts_terminal_monitor.cc @@ -42,8 +42,9 @@ bool WtsTerminalMonitor::LookupTerminalId(uint32 session_id, return false; } - bool result = WideToUTF8(working_directory, (bytes / sizeof(wchar_t)) - 1, - terminal_id); + bool result = base::WideToUTF8(working_directory, + (bytes / sizeof(wchar_t)) - 1, + terminal_id); WTSFreeMemory(working_directory); return result; } |