OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 // testing unreleased new extensions. | 284 // testing unreleased new extensions. |
285 WriteAttribute("name", CreateBase64Hash(UTF16ToUTF8(iter->name))); | 285 WriteAttribute("name", CreateBase64Hash(UTF16ToUTF8(iter->name))); |
286 std::string filename_bytes = | 286 std::string filename_bytes = |
287 #if defined(OS_WIN) | 287 #if defined(OS_WIN) |
288 UTF16ToUTF8(iter->path.BaseName().value()); | 288 UTF16ToUTF8(iter->path.BaseName().value()); |
289 #else | 289 #else |
290 iter->path.BaseName().value(); | 290 iter->path.BaseName().value(); |
291 #endif | 291 #endif |
292 WriteAttribute("filename", CreateBase64Hash(filename_bytes)); | 292 WriteAttribute("filename", CreateBase64Hash(filename_bytes)); |
293 WriteAttribute("version", UTF16ToUTF8(iter->version)); | 293 WriteAttribute("version", UTF16ToUTF8(iter->version)); |
294 // TODO(bauerb): Plug-in state is per-profile. | |
295 WriteIntAttribute("disabled", !webkit::npapi::IsPluginEnabled(*iter)); | 294 WriteIntAttribute("disabled", !webkit::npapi::IsPluginEnabled(*iter)); |
296 } | 295 } |
297 } | 296 } |
298 | 297 |
299 void MetricsLog::WriteInstallElement() { | 298 void MetricsLog::WriteInstallElement() { |
300 OPEN_ELEMENT_FOR_SCOPE("install"); | 299 OPEN_ELEMENT_FOR_SCOPE("install"); |
301 WriteAttribute("installdate", GetInstallDate()); | 300 WriteAttribute("installdate", GetInstallDate()); |
302 WriteIntAttribute("buildid", 0); // We're using appversion instead. | 301 WriteIntAttribute("buildid", 0); // We're using appversion instead. |
303 } | 302 } |
304 | 303 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 const std::string result_type(AutocompleteMatch::TypeToString(i->type)); | 486 const std::string result_type(AutocompleteMatch::TypeToString(i->type)); |
488 if (!result_type.empty()) | 487 if (!result_type.empty()) |
489 WriteAttribute("resulttype", result_type); | 488 WriteAttribute("resulttype", result_type); |
490 WriteIntAttribute("relevance", i->relevance); | 489 WriteIntAttribute("relevance", i->relevance); |
491 WriteIntAttribute("isstarred", i->starred ? 1 : 0); | 490 WriteIntAttribute("isstarred", i->starred ? 1 : 0); |
492 } | 491 } |
493 } | 492 } |
494 | 493 |
495 ++num_events_; | 494 ++num_events_; |
496 } | 495 } |
OLD | NEW |