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

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

Issue 7386002: Rename CommandLine::GetCommandLineString(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge, use writable string copies, restore TODO comment and empty string compare. Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <winspool.h> 6 #include <winspool.h>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 LOG(ERROR) << "Can't find regsvr32.exe."; 92 LOG(ERROR) << "Can't find regsvr32.exe.";
93 return result; 93 return result;
94 } 94 }
95 CommandLine command_line(regsvr32_path); 95 CommandLine command_line(regsvr32_path);
96 command_line.AppendArg("/s"); 96 command_line.AppendArg("/s");
97 if (!install) { 97 if (!install) {
98 command_line.AppendArg("/u"); 98 command_line.AppendArg("/u");
99 } 99 }
100 command_line.AppendArgPath(source_path); 100 command_line.AppendArgPath(source_path);
101 HANDLE process_handle; 101 HANDLE process_handle;
102 if (!base::LaunchApp(command_line.command_line_string(), 102 if (!base::LaunchApp(command_line.GetCommandLineString(),
103 true, 103 true,
104 false, 104 false,
105 &process_handle)) { 105 &process_handle)) {
106 LOG(ERROR) << "Unable to launch regsvr32.exe."; 106 LOG(ERROR) << "Unable to launch regsvr32.exe.";
107 return ERROR_NOT_SUPPORTED; 107 return ERROR_NOT_SUPPORTED;
108 } 108 }
109 base::win::ScopedHandle scoped_process_handle(process_handle); 109 base::win::ScopedHandle scoped_process_handle(process_handle);
110 DWORD exit_code = S_OK; 110 DWORD exit_code = S_OK;
111 if (!GetExitCodeProcess(scoped_process_handle, &exit_code)) { 111 if (!GetExitCodeProcess(scoped_process_handle, &exit_code)) {
112 HRESULT result = cloud_print::GetLastHResult(); 112 HRESULT result = cloud_print::GetLastHResult();
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 } else { 315 } else {
316 retval = InstallVirtualDriver(); 316 retval = InstallVirtualDriver();
317 } 317 }
318 if (!CommandLine::ForCurrentProcess()->HasSwitch("silent")) { 318 if (!CommandLine::ForCurrentProcess()->HasSwitch("silent")) {
319 cloud_print::DisplayWindowsMessage(NULL, retval, 319 cloud_print::DisplayWindowsMessage(NULL, retval,
320 cloud_print::LoadLocalString(IDS_DRIVER_NAME)); 320 cloud_print::LoadLocalString(IDS_DRIVER_NAME));
321 } 321 }
322 return retval; 322 return retval;
323 } 323 }
324 324
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698