Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Unified Diff: remoting/host/plugin/daemon_installer_win.cc

Issue 10579034: Removing incorrect usage of TO_L_STRING() macros. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/plugin/daemon_controller_win.cc ('k') | remoting/host/sas_injector_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/plugin/daemon_installer_win.cc
diff --git a/remoting/host/plugin/daemon_installer_win.cc b/remoting/host/plugin/daemon_installer_win.cc
index 3ebd2ca7a646dbcaa673136c546f547357f50849..c0bcd79f92fd34b0bd514535513fd515f979863d 100644
--- a/remoting/host/plugin/daemon_installer_win.cc
+++ b/remoting/host/plugin/daemon_installer_win.cc
@@ -10,10 +10,10 @@
#include "base/message_loop.h"
#include "base/process_util.h"
#include "base/string16.h"
-#include "base/stringize_macros.h"
#include "base/stringprintf.h"
#include "base/time.h"
#include "base/timer.h"
+#include "base/utf_string_conversions.h"
#include "base/win/object_watcher.h"
#include "base/win/registry.h"
#include "base/win/scoped_bstr.h"
@@ -31,25 +31,25 @@ using base::win::ScopedVariant;
namespace {
// The COM elevation moniker for Omaha.
-const char16 kOmahaElevationMoniker[] =
- TO_L_STRING("Elevation:Administrator!new:GoogleUpdate.Update3WebMachine");
+const wchar_t kOmahaElevationMoniker[] =
+ L"Elevation:Administrator!new:GoogleUpdate.Update3WebMachine";
// The registry key where the configuration of Omaha is stored.
-const char16 kOmahaUpdateKeyName[] = TO_L_STRING("Software\\Google\\Update");
+const wchar_t kOmahaUpdateKeyName[] = L"Software\\Google\\Update";
// The name of the value where the full path to GoogleUpdate.exe is stored.
-const char16 kOmahaPathValueName[] = TO_L_STRING("path");
+const wchar_t kOmahaPathValueName[] = L"path";
// The command line format string for GoogleUpdate.exe
-const char16 kGoogleUpdateCommandLineFormat[] =
- TO_L_STRING("\"%ls\" /install \"bundlename=Chromoting%%20Host&appguid=%ls&")
- TO_L_STRING("appname=Chromoting%%20Host&needsadmin=True&lang=%ls\"");
+const wchar_t kGoogleUpdateCommandLineFormat[] =
+ L"\"%ls\" /install \"bundlename=Chromoting%%20Host&appguid=%ls&"
+ L"appname=Chromoting%%20Host&needsadmin=True&lang=%ls\"";
// TODO(alexeypa): Get the desired laungage from the web app.
-const char16 kOmahaLanguage[] = TO_L_STRING("en");
+const wchar_t kOmahaLanguage[] = L"en";
// An empty string for optional parameters.
-const char16 kOmahaEmpty[] = TO_L_STRING("");
+const wchar_t kOmahaEmpty[] = L"";
// The installation status polling interval.
const int kOmahaPollIntervalMs = 500;
@@ -281,7 +281,7 @@ void DaemonCommandLineInstallerWin::Install() {
return;
}
- string16 google_update;
+ std::wstring google_update;
result = update_key.ReadValue(kOmahaPathValueName,
&google_update);
if (result != ERROR_SUCCESS) {
@@ -290,14 +290,15 @@ void DaemonCommandLineInstallerWin::Install() {
}
// Launch the updater process and wait for its termination.
- string16 command_line =
+ std::wstring command_line =
StringPrintf(kGoogleUpdateCommandLineFormat,
google_update.c_str(),
kHostOmahaAppid,
kOmahaLanguage);
base::LaunchOptions options;
- if (!base::LaunchProcess(command_line, options, process_.Receive())) {
+ if (!base::LaunchProcess(WideToUTF16(command_line), options,
+ process_.Receive())) {
result = GetLastError();
Done(HRESULT_FROM_WIN32(result));
return;
« no previous file with comments | « remoting/host/plugin/daemon_controller_win.cc ('k') | remoting/host/sas_injector_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698