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

Side by Side Diff: cloud_print/virtual_driver/win/install/setup.cc

Issue 785353003: Update cloud_print and chrome/service to use the new version of LaunchProcess. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <windows.h> 5 #include <windows.h>
6 #include <setupapi.h> // Must be included after windows.h 6 #include <setupapi.h> // Must be included after windows.h
7 #include <winspool.h> 7 #include <winspool.h>
8 #include <iomanip> 8 #include <iomanip>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return; 90 return;
91 base::CommandLine command_line(net_path); 91 base::CommandLine command_line(net_path);
92 command_line.AppendArg(command); 92 command_line.AppendArg(command);
93 command_line.AppendArg("spooler"); 93 command_line.AppendArg("spooler");
94 command_line.AppendArg("/y"); 94 command_line.AppendArg("/y");
95 95
96 base::LaunchOptions options; 96 base::LaunchOptions options;
97 options.wait = true; 97 options.wait = true;
98 options.start_hidden = true; 98 options.start_hidden = true;
99 VLOG(0) << command_line.GetCommandLineString(); 99 VLOG(0) << command_line.GetCommandLineString();
100 base::LaunchProcess(command_line, options, NULL); 100 base::LaunchProcess(command_line, options);
101 } 101 }
102 102
103 HRESULT RegisterPortMonitor(bool install, const base::FilePath& install_path) { 103 HRESULT RegisterPortMonitor(bool install, const base::FilePath& install_path) {
104 DCHECK(install || install_path.empty()); 104 DCHECK(install || install_path.empty());
105 base::FilePath target_path = GetNativeSystemPath(GetPortMonitorDllName()); 105 base::FilePath target_path = GetNativeSystemPath(GetPortMonitorDllName());
106 if (target_path.empty()) { 106 if (target_path.empty()) {
107 LOG(ERROR) << "Unable to get port monitor target path."; 107 LOG(ERROR) << "Unable to get port monitor target path.";
108 return HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND); 108 return HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND);
109 } 109 }
110 if (install) { 110 if (install) {
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 551
552 VLOG(0) << GetErrorMessage(retval) 552 VLOG(0) << GetErrorMessage(retval)
553 << " HRESULT=0x" << std::setbase(16) << retval; 553 << " HRESULT=0x" << std::setbase(16) << retval;
554 554
555 // Installer is silent by default as required by Google Update. 555 // Installer is silent by default as required by Google Update.
556 if (base::CommandLine::ForCurrentProcess()->HasSwitch("verbose")) { 556 if (base::CommandLine::ForCurrentProcess()->HasSwitch("verbose")) {
557 DisplayWindowsMessage(NULL, retval, LoadLocalString(IDS_DRIVER_NAME)); 557 DisplayWindowsMessage(NULL, retval, LoadLocalString(IDS_DRIVER_NAME));
558 } 558 }
559 return retval; 559 return retval;
560 } 560 }
OLDNEW
« no previous file with comments | « cloud_print/common/win/install_utils.cc ('k') | cloud_print/virtual_driver/win/port_monitor/port_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698