OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 //------------------------------------------------------------------------------ | 5 //------------------------------------------------------------------------------ |
6 // Description of the life cycle of a instance of MetricsService. | 6 // Description of the life cycle of a instance of MetricsService. |
7 // | 7 // |
8 // OVERVIEW | 8 // OVERVIEW |
9 // | 9 // |
10 // A MetricsService instance is typically created at application startup. It | 10 // A MetricsService instance is typically created at application startup. It |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 } | 429 } |
430 | 430 |
431 private: | 431 private: |
432 ~MetricsMemoryDetails() {} | 432 ~MetricsMemoryDetails() {} |
433 | 433 |
434 base::Closure callback_; | 434 base::Closure callback_; |
435 DISALLOW_COPY_AND_ASSIGN(MetricsMemoryDetails); | 435 DISALLOW_COPY_AND_ASSIGN(MetricsMemoryDetails); |
436 }; | 436 }; |
437 | 437 |
438 // static | 438 // static |
439 void MetricsService::RegisterPrefs(PrefService* local_state) { | 439 void MetricsService::RegisterPrefs(PrefServiceSimple* local_state) { |
440 DCHECK(IsSingleThreaded()); | 440 DCHECK(IsSingleThreaded()); |
441 local_state->RegisterStringPref(prefs::kMetricsClientID, ""); | 441 local_state->RegisterStringPref(prefs::kMetricsClientID, ""); |
442 local_state->RegisterIntegerPref(prefs::kMetricsLowEntropySource, | 442 local_state->RegisterIntegerPref(prefs::kMetricsLowEntropySource, |
443 kLowEntropySourceNotSet); | 443 kLowEntropySourceNotSet); |
444 local_state->RegisterInt64Pref(prefs::kMetricsClientIDTimestamp, 0); | 444 local_state->RegisterInt64Pref(prefs::kMetricsClientIDTimestamp, 0); |
445 local_state->RegisterInt64Pref(prefs::kStabilityLaunchTimeSec, 0); | 445 local_state->RegisterInt64Pref(prefs::kStabilityLaunchTimeSec, 0); |
446 local_state->RegisterInt64Pref(prefs::kStabilityLastTimestampSec, 0); | 446 local_state->RegisterInt64Pref(prefs::kStabilityLastTimestampSec, 0); |
447 local_state->RegisterStringPref(prefs::kStabilityStatsVersion, ""); | 447 local_state->RegisterStringPref(prefs::kStabilityStatsVersion, ""); |
448 local_state->RegisterInt64Pref(prefs::kStabilityStatsBuildTime, 0); | 448 local_state->RegisterInt64Pref(prefs::kStabilityStatsBuildTime, 0); |
449 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, true); | 449 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, true); |
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1987 if (local_state) { | 1987 if (local_state) { |
1988 const PrefService::Preference* uma_pref = | 1988 const PrefService::Preference* uma_pref = |
1989 local_state->FindPreference(prefs::kMetricsReportingEnabled); | 1989 local_state->FindPreference(prefs::kMetricsReportingEnabled); |
1990 if (uma_pref) { | 1990 if (uma_pref) { |
1991 bool success = uma_pref->GetValue()->GetAsBoolean(&result); | 1991 bool success = uma_pref->GetValue()->GetAsBoolean(&result); |
1992 DCHECK(success); | 1992 DCHECK(success); |
1993 } | 1993 } |
1994 } | 1994 } |
1995 return result; | 1995 return result; |
1996 } | 1996 } |
OLD | NEW |