| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 void MetricsLog::RecordIncrementalStabilityElements() { | 92 void MetricsLog::RecordIncrementalStabilityElements() { |
| 93 DCHECK(!locked_); | 93 DCHECK(!locked_); |
| 94 | 94 |
| 95 PrefService* pref = g_browser_process->local_state(); | 95 PrefService* pref = g_browser_process->local_state(); |
| 96 DCHECK(pref); | 96 DCHECK(pref); |
| 97 | 97 |
| 98 OPEN_ELEMENT_FOR_SCOPE("profile"); | 98 OPEN_ELEMENT_FOR_SCOPE("profile"); |
| 99 WriteCommonEventAttributes(); | 99 WriteCommonEventAttributes(); |
| 100 | 100 |
| 101 WriteInstallElement(); // Supply appversion. | 101 WriteInstallElement(); |
| 102 | 102 |
| 103 { | 103 { |
| 104 OPEN_ELEMENT_FOR_SCOPE("stability"); // Minimal set of stability elements. | 104 OPEN_ELEMENT_FOR_SCOPE("stability"); // Minimal set of stability elements. |
| 105 WriteRequiredStabilityAttributes(pref); | 105 WriteRequiredStabilityAttributes(pref); |
| 106 WriteRealtimeStabilityAttributes(pref); | 106 WriteRealtimeStabilityAttributes(pref); |
| 107 | 107 |
| 108 WritePluginStabilityElements(pref); | 108 WritePluginStabilityElements(pref); |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 | 111 |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 const std::string result_type(AutocompleteMatch::TypeToString(i->type)); | 488 const std::string result_type(AutocompleteMatch::TypeToString(i->type)); |
| 489 if (!result_type.empty()) | 489 if (!result_type.empty()) |
| 490 WriteAttribute("resulttype", result_type); | 490 WriteAttribute("resulttype", result_type); |
| 491 WriteIntAttribute("relevance", i->relevance); | 491 WriteIntAttribute("relevance", i->relevance); |
| 492 WriteIntAttribute("isstarred", i->starred ? 1 : 0); | 492 WriteIntAttribute("isstarred", i->starred ? 1 : 0); |
| 493 } | 493 } |
| 494 } | 494 } |
| 495 | 495 |
| 496 ++num_events_; | 496 ++num_events_; |
| 497 } | 497 } |
| OLD | NEW |