Index: chrome/installer/setup/install.cc |
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc |
index 5ab14e2cde784f09ffb94d5659ac082c31c6aff6..a38f61e57bd284af9316c4b7c6c39613cbc49784 100644 |
--- a/chrome/installer/setup/install.cc |
+++ b/chrome/installer/setup/install.cc |
@@ -440,19 +440,28 @@ void CreateOrUpdateShortcuts( |
void RegisterChromeOnMachine(const installer::InstallerState& installer_state, |
const installer::Product& product, |
- bool make_chrome_default) { |
+ bool make_chrome_default, |
+ const base::Version& version) { |
DCHECK(product.is_chrome()); |
+ const base::FilePath chrome_exe( |
grt (UTC plus 2)
2016/11/24 07:49:34
nit: move this back down to line 465 where it was
pastarmovj
2016/11/24 09:51:09
Done.
|
+ installer_state.target_path().Append(installer::kChromeExe)); |
+ |
// Try to add Chrome to Media Player shim inclusion list. We don't do any |
// error checking here because this operation will fail if user doesn't |
// have admin rights and we want to ignore the error. |
AddChromeToMediaPlayerList(); |
+ // Register the event log provider for system-level installs only, as it |
+ // requires admin privileges. |
+ if (installer_state.system_install()) { |
+ RegisterEventLogProvider(installer_state.target_path(), |
+ version.GetString()); |
grt (UTC plus 2)
2016/11/24 07:49:34
nit: pass |version| by constref rather than string
pastarmovj
2016/11/24 09:51:09
Done.
|
+ } |
+ |
// Make Chrome the default browser if desired when possible. Otherwise, only |
// register it with Windows. |
BrowserDistribution* dist = product.distribution(); |
- const base::FilePath chrome_exe( |
- installer_state.target_path().Append(installer::kChromeExe)); |
VLOG(1) << "Registering Chrome as browser: " << chrome_exe.value(); |
if (make_chrome_default && ShellUtil::CanMakeChromeDefaultUnattended()) { |
int level = ShellUtil::CURRENT_USER; |
@@ -562,8 +571,9 @@ InstallStatus InstallOrUpdateProduct( |
&force_chrome_default_for_user); |
} |
- RegisterChromeOnMachine(installer_state, *chrome_product, |
- make_chrome_default || force_chrome_default_for_user); |
+ RegisterChromeOnMachine( |
+ installer_state, *chrome_product, |
+ make_chrome_default || force_chrome_default_for_user, new_version); |
if (!installer_state.system_install()) { |
DCHECK_EQ(chrome_product->distribution(), |
@@ -647,7 +657,7 @@ void HandleOsUpgradeForBrowser(const installer::InstallerState& installer_state, |
INSTALL_SHORTCUT_REPLACE_EXISTING); |
// Adapt Chrome registrations to this new OS. |
- RegisterChromeOnMachine(installer_state, chrome, false); |
+ RegisterChromeOnMachine(installer_state, chrome, false, installed_version); |
// Active Setup registrations are sometimes lost across OS update, make sure |
// they're back in place. Note: when Active Setup registrations in HKLM are |