Index: chrome/installer/setup/install.cc |
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc |
index 5ab14e2cde784f09ffb94d5659ac082c31c6aff6..e9b97176ddda7d9b54d97264e7b05810be0db8ad 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( |
+ 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(); |
+ // Try to register the event log provider for Chrome, but only if it is a |
grt (UTC plus 2)
2016/11/22 10:41:25
nit:
// Register the event log provider for syst
pastarmovj
2016/11/23 14:27:25
Done.
|
+ // system profile because this step admin privileges. |
+ if (installer_state.system_install()) { |
+ RegisterEventLogProvider(installer_state.target_path().Append( |
grt (UTC plus 2)
2016/11/22 10:41:25
nit: AppendASCII(version.GetString())
pastarmovj
2016/11/23 14:27:25
Obsoleted after moving this to a parameter of Regi
|
+ base::ASCIIToUTF16(version.GetString()))); |
+ } |
+ |
// 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 |