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

Side by Side Diff: chrome/browser/metrics/metrics_service.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1992 if (local_state) { 1992 if (local_state) {
1993 const PrefService::Preference* uma_pref = 1993 const PrefService::Preference* uma_pref =
1994 local_state->FindPreference(prefs::kMetricsReportingEnabled); 1994 local_state->FindPreference(prefs::kMetricsReportingEnabled);
1995 if (uma_pref) { 1995 if (uma_pref) {
1996 bool success = uma_pref->GetValue()->GetAsBoolean(&result); 1996 bool success = uma_pref->GetValue()->GetAsBoolean(&result);
1997 DCHECK(success); 1997 DCHECK(success);
1998 } 1998 }
1999 } 1999 }
2000 return result; 2000 return result;
2001 } 2001 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service.h ('k') | chrome/browser/metrics/variations/variations_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698