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

Side by Side Diff: chrome/installer/util/shell_util.cc

Issue 160481: Add missing space to command line that registers Chrome on Windows. (Closed)
Patch Set: Created 11 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This file defines functions that integrate Chrome in Windows shell. These 5 // This file defines functions that integrate Chrome in Windows shell. These
6 // functions can be used by Chrome as well as Chrome installer. All of the 6 // functions can be used by Chrome as well as Chrome installer. All of the
7 // work is done by the local functions defined in anonymous namespace in 7 // work is done by the local functions defined in anonymous namespace in
8 // this class. 8 // this class.
9 9
10 #include "chrome/installer/util/shell_util.h" 10 #include "chrome/installer/util/shell_util.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 key.ReadValue(installer_util::kUninstallStringField, &exe_path); 327 key.ReadValue(installer_util::kUninstallStringField, &exe_path);
328 CommandLine command_line(L""); 328 CommandLine command_line(L"");
329 command_line.ParseFromString(exe_path); 329 command_line.ParseFromString(exe_path);
330 exe_path = command_line.program(); 330 exe_path = command_line.program();
331 } 331 }
332 if (file_util::PathExists(exe_path)) { 332 if (file_util::PathExists(exe_path)) {
333 std::wstring params(L"--"); 333 std::wstring params(L"--");
334 params.append(installer_util::switches::kRegisterChromeBrowser); 334 params.append(installer_util::switches::kRegisterChromeBrowser);
335 params.append(L"=\"" + chrome_exe + L"\""); 335 params.append(L"=\"" + chrome_exe + L"\"");
336 if (!suffix.empty()) { 336 if (!suffix.empty()) {
337 params.append(L"--"); 337 params.append(L" --");
338 params.append(installer_util::switches::kRegisterChromeBrowserSuffix); 338 params.append(installer_util::switches::kRegisterChromeBrowserSuffix);
339 params.append(L"=\"" + suffix + L"\""); 339 params.append(L"=\"" + suffix + L"\"");
340 } 340 }
341 DWORD ret_val = 0; 341 DWORD ret_val = 0;
342 InstallUtil::ExecuteExeAsAdmin(exe_path, params, &ret_val); 342 InstallUtil::ExecuteExeAsAdmin(exe_path, params, &ret_val);
343 if (ret_val == 0) 343 if (ret_val == 0)
344 return true; 344 return true;
345 } 345 }
346 return false; 346 return false;
347 } 347 }
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 } else { 779 } else {
780 return file_util::UpdateShortcutLink(chrome_exe.c_str(), // target 780 return file_util::UpdateShortcutLink(chrome_exe.c_str(), // target
781 shortcut.c_str(), // shortcut 781 shortcut.c_str(), // shortcut
782 chrome_path.c_str(), // working dir 782 chrome_path.c_str(), // working dir
783 NULL, // arguments 783 NULL, // arguments
784 description.c_str(), // description 784 description.c_str(), // description
785 chrome_exe.c_str(), // icon file 785 chrome_exe.c_str(), // icon file
786 0); // icon index 786 0); // icon index
787 } 787 }
788 } 788 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698