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

Unified Diff: chrome/installer/util/google_update_settings.cc

Issue 2306373002: Write the _DidRun per-user stat along with the usual "dr".
Patch Set: Created 4 years, 3 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/installer/util/google_update_constants.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/google_update_settings.cc
diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc
index 11d7e96efba0d34e2ef263c8149143734b8c06ef..61bffac90c7713205d951f6810233f022e062d95 100644
--- a/chrome/installer/util/google_update_settings.cc
+++ b/chrome/installer/util/google_update_settings.cc
@@ -239,17 +239,21 @@ bool GetUpdatePolicyFromDword(
#endif // defined(GOOGLE_CHROME_BUILD)
bool UpdateDidRunStateForApp(const AppRegistrationData& app_reg_data,
+ bool system_level,
bool did_run) {
+ WritePerUserStat(app_reg_data, system_level, google_update::kRegDidRunStat,
+ did_run ? 1U : 0U);
return WriteGoogleUpdateStrKeyInternal(
app_reg_data, google_update::kRegDidRunField, did_run ? L"1" : L"0");
}
// Convenience routine: GoogleUpdateSettings::UpdateDidRunStateForApp()
// specialized for Chrome Binaries.
-bool UpdateDidRunStateForBinaries(bool did_run) {
+bool UpdateDidRunStateForBinaries(bool system_level, bool did_run) {
BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution(
BrowserDistribution::CHROME_BINARIES);
- return UpdateDidRunStateForApp(dist->GetAppRegistrationData(), did_run);
+ return UpdateDidRunStateForApp(dist->GetAppRegistrationData(), system_level,
+ did_run);
}
} // namespace
@@ -508,10 +512,10 @@ bool GoogleUpdateSettings::ClearReferral() {
bool GoogleUpdateSettings::UpdateDidRunState(bool did_run, bool system_level) {
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
bool result = UpdateDidRunStateForApp(dist->GetAppRegistrationData(),
- did_run);
+ system_level, did_run);
// Update state for binaries, even if the previous call was unsuccessful.
if (InstallUtil::IsMultiInstall(dist, system_level))
- result = UpdateDidRunStateForBinaries(did_run) && result;
+ result = UpdateDidRunStateForBinaries(system_level, did_run) && result;
return result;
}
« no previous file with comments | « chrome/installer/util/google_update_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698