Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/metrics/metrics_log.h" | 5 #include "chrome/browser/metrics/metrics_log.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 224 WriteIntAttribute("rendererhangcount", count); | 224 WriteIntAttribute("rendererhangcount", count); |
| 225 pref->SetInteger(prefs::kStabilityRendererHangCount, 0); | 225 pref->SetInteger(prefs::kStabilityRendererHangCount, 0); |
| 226 } | 226 } |
| 227 | 227 |
| 228 count = pref->GetInteger(prefs::kStabilityChildProcessCrashCount); | 228 count = pref->GetInteger(prefs::kStabilityChildProcessCrashCount); |
| 229 if (count) { | 229 if (count) { |
| 230 WriteIntAttribute("childprocesscrashcount", count); | 230 WriteIntAttribute("childprocesscrashcount", count); |
| 231 pref->SetInteger(prefs::kStabilityChildProcessCrashCount, 0); | 231 pref->SetInteger(prefs::kStabilityChildProcessCrashCount, 0); |
| 232 } | 232 } |
| 233 | 233 |
| 234 #if defined(OS_CHROMEOS) | |
| 235 count = pref->GetInteger(prefs::kStabilityOtherUserCrashCount); | |
|
petkov
2011/01/06 18:50:36
did you forget to add the file that declares/defin
kmixter1
2011/01/14 00:07:02
Done.
| |
| 236 if (count) { | |
| 237 // TODO(kmixter): Write attribute once log server supports it. | |
| 238 // WriteIntAttribute("otherusercrashcount", count); | |
| 239 LOG(WARNING) << "Would write otherusercrashcount=" << count; | |
|
petkov
2011/01/06 18:50:36
you'll remove these logs eventually, i assume.
kmixter1
2011/01/14 00:07:02
Yes, until the log server can handle these additio
| |
| 240 pref->SetInteger(prefs::kStabilityOtherUserCrashCount, 0); | |
| 241 } | |
| 242 | |
| 243 count = pref->GetInteger(prefs::kStabilityKernelCrashCount); | |
| 244 if (count) { | |
| 245 // TODO(kmixter): Write attribute once log server supports it. | |
| 246 // WriteIntAttribute("kernelcrashcount", count); | |
| 247 LOG(WARNING) << "Would write kernelcrashcount=" << count; | |
| 248 pref->SetInteger(prefs::kStabilityKernelCrashCount, 0); | |
| 249 } | |
| 250 | |
| 251 count = pref->GetInteger(prefs::kStabilitySystemUncleanShutdownCount); | |
| 252 if (count) { | |
| 253 // TODO(kmixter): Write attribute once log server supports it. | |
| 254 // WriteIntAttribute("systemuncleanshutdowns", count); | |
| 255 LOG(WARNING) << "Would write systemuncleanshutdowns=" << count; | |
| 256 pref->SetInteger(prefs::kStabilitySystemUncleanShutdownCount, 0); | |
| 257 } | |
| 258 #endif // OS_CHROMEOS | |
| 259 | |
| 234 int64 recent_duration = GetIncrementalUptime(pref); | 260 int64 recent_duration = GetIncrementalUptime(pref); |
| 235 if (recent_duration) | 261 if (recent_duration) |
| 236 WriteInt64Attribute("uptimesec", recent_duration); | 262 WriteInt64Attribute("uptimesec", recent_duration); |
| 237 } | 263 } |
| 238 | 264 |
| 239 void MetricsLog::WritePluginList( | 265 void MetricsLog::WritePluginList( |
| 240 const std::vector<WebPluginInfo>& plugin_list) { | 266 const std::vector<WebPluginInfo>& plugin_list) { |
| 241 DCHECK(!locked_); | 267 DCHECK(!locked_); |
| 242 | 268 |
| 243 OPEN_ELEMENT_FOR_SCOPE("plugins"); | 269 OPEN_ELEMENT_FOR_SCOPE("plugins"); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 447 const std::string result_type(AutocompleteMatch::TypeToString(i->type)); | 473 const std::string result_type(AutocompleteMatch::TypeToString(i->type)); |
| 448 if (!result_type.empty()) | 474 if (!result_type.empty()) |
| 449 WriteAttribute("resulttype", result_type); | 475 WriteAttribute("resulttype", result_type); |
| 450 WriteIntAttribute("relevance", i->relevance); | 476 WriteIntAttribute("relevance", i->relevance); |
| 451 WriteIntAttribute("isstarred", i->starred ? 1 : 0); | 477 WriteIntAttribute("isstarred", i->starred ? 1 : 0); |
| 452 } | 478 } |
| 453 } | 479 } |
| 454 | 480 |
| 455 ++num_events_; | 481 ++num_events_; |
| 456 } | 482 } |
| OLD | NEW |