diff options
author | rvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-27 01:03:43 +0000 |
---|---|---|
committer | rvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-27 01:03:43 +0000 |
commit | 166a865e356b1841a1e3bf3b32bc5aaf13215f6e (patch) | |
tree | 6aeefbef7ebeb5eb1a232b6c88645da240d73a79 /cloud_print/virtual_driver | |
parent | 4cb7699e349fabe62f9b4af7894361c4334161f9 (diff) | |
download | chromium_src-166a865e356b1841a1e3bf3b32bc5aaf13215f6e.zip chromium_src-166a865e356b1841a1e3bf3b32bc5aaf13215f6e.tar.gz chromium_src-166a865e356b1841a1e3bf3b32bc5aaf13215f6e.tar.bz2 |
Base: Remove Receive() from ScopedHandle.
In general, the OS API contract doesn't guarantee that output variables are
not modified on failure, so a Reeceive pattern is fundamentally insecure.
BUG=318531
TEST=current tests
tbr'ing owners for the consumers.
TBR=jvoung@chromium.org, thakis@chromium.org, sergeyu@chromium.org, grt@chromium.org, gene@chromium.org, youngki@chromium.org
Review URL: https://codereview.chromium.org/71013004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print/virtual_driver')
-rw-r--r-- | cloud_print/virtual_driver/win/install/setup.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cloud_print/virtual_driver/win/install/setup.cc b/cloud_print/virtual_driver/win/install/setup.cc index 6e0df24..1c87ca2 100644 --- a/cloud_print/virtual_driver/win/install/setup.cc +++ b/cloud_print/virtual_driver/win/install/setup.cc @@ -97,7 +97,7 @@ void SpoolerServiceCommand(const char* command) { base::LaunchOptions options; options.wait = true; options.start_hidden = true; - LOG(INFO) << command_line.GetCommandLineString(); + VLOG(0) << command_line.GetCommandLineString(); base::LaunchProcess(command_line, options, NULL); } @@ -140,7 +140,8 @@ HRESULT RegisterPortMonitor(bool install, const base::FilePath& install_path) { options.wait = true; base::win::ScopedHandle regsvr32_handle; - if (!base::LaunchProcess(command_line, options, regsvr32_handle.Receive())) { + if (!base::LaunchProcess(command_line.GetCommandLineString(), options, + ®svr32_handle)) { LOG(ERROR) << "Unable to launch regsvr32.exe."; return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED); } @@ -540,8 +541,8 @@ int WINAPI WinMain(__in HINSTANCE hInstance, CommandLine::Init(0, NULL); HRESULT retval = cloud_print::ExecuteCommands(); - LOG(INFO) << _com_error(retval).ErrorMessage() << " HRESULT=0x" << - std::setbase(16) << retval; + VLOG(0) << _com_error(retval).ErrorMessage() << " HRESULT=0x" << + std::setbase(16) << retval; // Installer is silent by default as required by Google Update. if (CommandLine::ForCurrentProcess()->HasSwitch("verbose")) { |