Lines Matching full:pref
47 int64 MetricsLog::GetIncrementalUptime(PrefService* pref) {
54 int64 metrics_uptime = pref->GetInt64(prefs::kUninstallMetricsUptimeSec);
56 pref->SetInt64(prefs::kUninstallMetricsUptimeSec, metrics_uptime);
63 PrefService* pref = g_browser_process->local_state();
64 if (pref) {
65 return pref->GetString(prefs::kMetricsClientIDTimestamp);
95 PrefService* pref = g_browser_process->local_state();
96 DCHECK(pref);
105 WriteRequiredStabilityAttributes(pref);
106 WriteRealtimeStabilityAttributes(pref);
108 WritePluginStabilityElements(pref);
112 void MetricsLog::WriteStabilityElement(PrefService* pref) {
115 DCHECK(pref);
122 WriteRequiredStabilityAttributes(pref);
123 WriteRealtimeStabilityAttributes(pref);
128 pref->GetInteger(
130 pref->SetInteger(prefs::kStabilityIncompleteSessionEndCount, 0);
134 pref->GetInteger(prefs::kStabilityBreakpadRegistrationSuccess));
135 pref->SetInteger(prefs::kStabilityBreakpadRegistrationSuccess, 0);
137 pref->GetInteger(prefs::kStabilityBreakpadRegistrationFail));
138 pref->SetInteger(prefs::kStabilityBreakpadRegistrationFail, 0);
140 pref->GetInteger(prefs::kStabilityDebuggerPresent));
141 pref->SetInteger(prefs::kStabilityDebuggerPresent, 0);
143 pref->GetInteger(prefs::kStabilityDebuggerNotPresent));
144 pref->SetInteger(prefs::kStabilityDebuggerNotPresent, 0);
146 WritePluginStabilityElements(pref);
149 void MetricsLog::WritePluginStabilityElements(PrefService* pref) {
151 const ListValue* plugin_stats_list = pref->GetList(
184 pref->ClearPref(prefs::kStabilityPluginStats);
188 void MetricsLog::WriteRequiredStabilityAttributes(PrefService* pref) {
192 pref->GetInteger(prefs::kStabilityLaunchCount));
193 pref->SetInteger(prefs::kStabilityLaunchCount, 0);
195 pref->GetInteger(prefs::kStabilityCrashCount));
196 pref->SetInteger(prefs::kStabilityCrashCount, 0);
199 void MetricsLog::WriteRealtimeStabilityAttributes(PrefService* pref) {
204 int count = pref->GetInteger(prefs::kStabilityPageLoadCount);
207 pref->SetInteger(prefs::kStabilityPageLoadCount, 0);
210 count = pref->GetInteger(prefs::kStabilityRendererCrashCount);
213 pref->SetInteger(prefs::kStabilityRendererCrashCount, 0);
216 count = pref->GetInteger(prefs::kStabilityExtensionRendererCrashCount);
219 pref->SetInteger(prefs::kStabilityExtensionRendererCrashCount, 0);
222 count = pref->GetInteger(prefs::kStabilityRendererHangCount);
225 pref->SetInteger(prefs::kStabilityRendererHangCount, 0);
228 count = pref->GetInteger(prefs::kStabilityChildProcessCrashCount);
231 pref->SetInteger(prefs::kStabilityChildProcessCrashCount, 0);
235 count = pref->GetInteger(prefs::kStabilityOtherUserCrashCount);
242 pref->SetInteger(prefs::kStabilityOtherUserCrashCount, 0);
245 count = pref->GetInteger(prefs::kStabilityKernelCrashCount);
252 pref->SetInteger(prefs::kStabilityKernelCrashCount, 0);
255 count = pref->GetInteger(prefs::kStabilitySystemUncleanShutdownCount);
262 pref->SetInteger(prefs::kStabilitySystemUncleanShutdownCount, 0);
266 int64 recent_duration = GetIncrementalUptime(pref);
307 PrefService* pref = g_browser_process->local_state();
316 WriteStabilityElement(pref);
361 pref->GetInteger(prefs::kNumBookmarksOnBookmarkBar);
363 pref->GetInteger(prefs::kNumFoldersOnBookmarkBar);
365 pref->GetInteger(prefs::kNumBookmarksInOtherBookmarkFolder);
367 pref->GetInteger(prefs::kNumFoldersInOtherBookmarkFolder);
387 WriteIntAttribute("count", pref->GetInteger(prefs::kNumKeywords));