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

Unified Diff: chrome/browser/component_updater/recovery_component_installer.cc

Issue 1136943004: add flags to recovery executable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed executable bit Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/recovery_component_installer.cc
diff --git a/chrome/browser/component_updater/recovery_component_installer.cc b/chrome/browser/component_updater/recovery_component_installer.cc
index 2563b103c3d256df62194efce880ff9ca1433ee5..cfbd0874d7bed0fae1edd2cb5bcce449ef9cb8f9 100644
--- a/chrome/browser/component_updater/recovery_component_installer.cc
+++ b/chrome/browser/component_updater/recovery_component_installer.cc
@@ -133,13 +133,20 @@ void DoElevatedInstallRecoveryComponent(const base::FilePath& path) {
return;
base::CommandLine cmdline(main_file);
+
+ // Add a flag to indicate this is a re-attempted install so that the recovery
+ // executable can report back accordingly.
+ cmdline.AppendArg("/deferredrun");
+
std::string arguments;
if (manifest->GetStringASCII("x-recovery-args", &arguments))
cmdline.AppendArg(arguments);
std::string add_version;
if (manifest->GetStringASCII("x-recovery-add-version", &add_version) &&
add_version == "yes") {
- cmdline.AppendSwitchASCII("version", version.GetString());
+ std::string version_string = "/version ";
+ version_string += version.GetString();
+ cmdline.AppendArg(version_string);
}
RecordRecoveryComponentUMAEvent(RCE_RUNNING_ELEVATED);
@@ -339,7 +346,9 @@ bool RecoveryComponentInstaller::Install(const base::DictionaryValue& manifest,
std::string add_version;
if (manifest.GetStringASCII("x-recovery-add-version", &add_version) &&
add_version == "yes") {
- cmdline.AppendSwitchASCII("version", current_version_.GetString());
+ std::string version_string = "/version ";
Sorin Jianu 2015/05/16 00:19:11 As discussed, we could factor this out as a functi
xiaoling 2015/05/16 01:20:09 Done.
+ version_string += current_version_.GetString();
+ cmdline.AppendArg(version_string);
}
if (!RunInstallCommand(cmdline, path)) {
« 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