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

Unified Diff: chrome/installer/util/install_util.cc

Issue 6526040: CommandLine refactoring and cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits, merge changes. Created 9 years, 7 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 | « chrome/installer/util/install_util.h ('k') | chrome/installer/util/product_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/install_util.cc
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index 480e5df2f4e988ff508b68c32039112864949693..6724ca245c3ceaedc6ed8231dc3f378fc3d6d347 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -356,25 +356,10 @@ int InstallUtil::GetInstallReturnCode(installer::InstallStatus status) {
}
// static
-void InstallUtil::MakeUninstallCommand(const std::wstring& exe_path,
+void InstallUtil::MakeUninstallCommand(const std::wstring& program,
const std::wstring& arguments,
CommandLine* command_line) {
- const bool no_program = exe_path.empty();
-
- // Return a bunch of nothingness.
- if (no_program && arguments.empty()) {
- *command_line = CommandLine(CommandLine::NO_PROGRAM);
- } else {
- // Form a full command line string.
- std::wstring command;
- command.append(1, L'"')
- .append(no_program ? L"" : exe_path)
- .append(L"\" ")
- .append(arguments);
-
- // If we have a program name, return this complete command line.
- *command_line = CommandLine::FromString(command);
- }
+ *command_line = CommandLine::FromString(L"\"" + program + L"\" " + arguments);
}
std::wstring InstallUtil::GetCurrentDate() {
« no previous file with comments | « chrome/installer/util/install_util.h ('k') | chrome/installer/util/product_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698