diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-18 06:00:38 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-18 06:00:38 +0000 |
commit | c9abf24159ca4d02762e97ec814e7427e9c508cc (patch) | |
tree | 16da46175775f5d81eba75d6fbcab480b4150ca5 /chrome/browser/metrics | |
parent | 7539dbcca94ddbb5e6fcb43545b20ba93ede10cc (diff) | |
download | chromium_src-c9abf24159ca4d02762e97ec814e7427e9c508cc.zip chromium_src-c9abf24159ca4d02762e97ec814e7427e9c508cc.tar.gz chromium_src-c9abf24159ca4d02762e97ec814e7427e9c508cc.tar.bz2 |
Clear yet another few stats when a new chrome version is installed
Re-review with Laforge found that three stats were registered, but not
cleared when we create a new version. This CL clears those stats.
I also cleaned a tiny fragment that relates to one stat (moving the
setting of the stat into a conditional... which may make code more
readable).
r=huanr
Review URL: http://codereview.chromium.org/155722
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21047 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics')
-rw-r--r-- | chrome/browser/metrics/metrics_service.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index 3b3b149..f36e0aa 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -353,6 +353,7 @@ void MetricsService::RegisterPrefs(PrefService* local_state) { // static void MetricsService::DiscardOldStabilityStats(PrefService* local_state) { local_state->SetBoolean(prefs::kStabilityExitedCleanly, true); + local_state->SetBoolean(prefs::kStabilitySessionEndCompleted, true); local_state->SetInteger(prefs::kStabilityIncompleteSessionEndCount, 0); local_state->SetInteger(prefs::kStabilityBreakpadRegistrationSuccess, 0); @@ -370,6 +371,8 @@ void MetricsService::DiscardOldStabilityStats(PrefService* local_state) { local_state->SetInteger(prefs::kSecurityRendererOnSboxDesktop, 0); local_state->SetInteger(prefs::kSecurityRendererOnDefaultDesktop, 0); + local_state->SetString(prefs::kStabilityLaunchTimeSec, L"0"); + local_state->SetString(prefs::kStabilityLastTimestampSec, L"0"); local_state->SetString(prefs::kStabilityUptimeSec, L"0"); local_state->ClearPref(prefs::kStabilityPluginStats); @@ -676,9 +679,9 @@ void MetricsService::InitializeMetricsState() { if (!pref->GetBoolean(prefs::kStabilitySessionEndCompleted)) { IncrementPrefValue(prefs::kStabilityIncompleteSessionEndCount); + // This is marked false when we get a WM_ENDSESSION. + pref->SetBoolean(prefs::kStabilitySessionEndCompleted, true); } - // This is marked false when we get a WM_ENDSESSION. - pref->SetBoolean(prefs::kStabilitySessionEndCompleted, true); int64 last_start_time = pref->GetInt64(prefs::kStabilityLaunchTimeSec); int64 last_end_time = pref->GetInt64(prefs::kStabilityLastTimestampSec); |