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

Unified Diff: chrome/installer/setup/install.cc

Issue 2507753002: Install the chrome event log provider together with the browser. (Closed)
Patch Set: Address comments. Created 4 years, 1 month 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
Index: chrome/installer/setup/install.cc
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index 5ab14e2cde784f09ffb94d5659ac082c31c6aff6..0bbbef26d1c5e1f811ccb754a17e4c9769edbf0f 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -443,16 +443,22 @@ void RegisterChromeOnMachine(const installer::InstallerState& installer_state,
bool make_chrome_default) {
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
+ // system profile because this step admin privileges.
+ if (installer_state.system_install())
+ RegisterEventLogProvider(chrome_exe);
+
// 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;

Powered by Google App Engine
This is Rietveld 408576698