Chromium Code Reviews| Index: chrome/installer/setup/install.cc |
| diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc |
| index 5ab14e2cde784f09ffb94d5659ac082c31c6aff6..248936cbe0736274cca0674f3094149216957bd7 100644 |
| --- a/chrome/installer/setup/install.cc |
| +++ b/chrome/installer/setup/install.cc |
| @@ -440,7 +440,8 @@ 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()); |
| // Try to add Chrome to Media Player shim inclusion list. We don't do any |
| @@ -448,6 +449,12 @@ void RegisterChromeOnMachine(const installer::InstallerState& installer_state, |
| // 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()) { |
|
grt (UTC plus 2)
2016/11/24 14:26:13
nit: you can get rid of these braces now. :-)
pastarmovj
2016/12/08 15:33:55
Done.
|
| + RegisterEventLogProvider(installer_state.target_path(), version); |
| + } |
| + |
| // Make Chrome the default browser if desired when possible. Otherwise, only |
| // register it with Windows. |
| BrowserDistribution* dist = product.distribution(); |
| @@ -562,8 +569,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 +655,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 |