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

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

Issue 1146843003: Beacons for tracking default browser status. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: take three Created 5 years, 7 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 | « chrome/chrome_installer_util.gypi ('k') | chrome/installer/setup/install_worker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install.cc
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index 68ecef4479410e99f5d6d03b68edc20301add5f8..58272b7f454da3a8d6398b386d8d881894f23155 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -25,6 +25,7 @@
#include "chrome/installer/setup/install_worker.h"
#include "chrome/installer/setup/setup_constants.h"
#include "chrome/installer/util/auto_launch_util.h"
+#include "chrome/installer/util/beacons.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/create_reg_key_work_item.h"
#include "chrome/installer/util/delete_after_reboot_helper.h"
@@ -582,6 +583,13 @@ InstallStatus InstallOrUpdateProduct(
installer_state.target_path());
}
}
+
+ if (!installer_state.system_install()) {
+ DCHECK_EQ(chrome_product->distribution(),
+ BrowserDistribution::GetDistribution());
+ UpdateDefaultBrowserBeaconForPath(
+ installer_state.target_path().Append(installer::kChromeExe));
+ }
}
installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS);
@@ -617,6 +625,11 @@ void HandleOsUpgradeForBrowser(const installer::InstallerState& installer_state,
CreateOrUpdateShortcuts(
chrome_exe, chrome, prefs, level, INSTALL_SHORTCUT_REPLACE_EXISTING);
RegisterChromeOnMachine(installer_state, chrome, false);
+
+ UpdateOsUpgradeBeacon(installer_state.system_install(),
+ BrowserDistribution::GetDistribution());
+ if (!installer_state.system_install())
+ UpdateDefaultBrowserBeaconForPath(chrome_exe);
}
}
@@ -644,6 +657,8 @@ void HandleActiveSetupForBrowser(const base::FilePath& installation_root,
base::FilePath chrome_exe(installation_root.Append(kChromeExe));
CreateOrUpdateShortcuts(
chrome_exe, chrome, prefs, CURRENT_USER, install_operation);
+
+ UpdateDefaultBrowserBeaconForPath(chrome_exe);
}
} // namespace installer
« no previous file with comments | « chrome/chrome_installer_util.gypi ('k') | chrome/installer/setup/install_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698