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

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

Issue 2286483002: Serialize Google Update state as part of the recovery component update checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/component_updater.gypi » ('j') | 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 7402c47a65e2472b6e67fe14bf9866238c49d751..42417839bdd1726f99cbffb5fb39f3c3ffe7bc7d 100644
--- a/chrome/browser/component_updater/recovery_component_installer.cc
+++ b/chrome/browser/component_updater/recovery_component_installer.cc
@@ -25,6 +25,9 @@
#include "build/build_config.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#if defined(OS_WIN)
+#include "chrome/installer/util/install_util.h"
+#endif // OS_WIN
#include "components/component_updater/component_updater_paths.h"
#include "components/component_updater/component_updater_service.h"
#include "components/component_updater/pref_names.h"
@@ -227,6 +230,14 @@ void RecoveryRegisterHelper(ComponentUpdateService* cus, PrefService* prefs) {
return;
}
+ update_client::InstallerAttributes installer_attributes;
+#if defined(OS_WIN)
+ base::FilePath exe_path;
+ PathService::Get(base::FILE_EXE, &exe_path);
+ installer_attributes["ismachine"] =
+ InstallUtil::IsPerUserInstall(exe_path) ? "0" : "1";
+#endif // OS_WIN
+
update_client::CrxComponent recovery;
recovery.name = "recovery";
recovery.installer = new RecoveryComponentInstaller(version, prefs);
@@ -234,6 +245,7 @@ void RecoveryRegisterHelper(ComponentUpdateService* cus, PrefService* prefs) {
recovery.pk_hash.assign(kSha2Hash, &kSha2Hash[sizeof(kSha2Hash)]);
recovery.supports_group_policy_enable_component_updates = true;
recovery.requires_network_encryption = false;
+ recovery.installer_attributes = installer_attributes;
if (!cus->RegisterComponent(recovery)) {
NOTREACHED() << "Recovery component registration failed.";
}
« no previous file with comments | « no previous file | components/component_updater.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698