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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
276 | 276 |
277 for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator iter = | 277 for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator iter = |
278 plugin_list.begin(); | 278 plugin_list.begin(); |
279 iter != plugin_list.end(); ++iter) { | 279 iter != plugin_list.end(); ++iter) { |
280 OPEN_ELEMENT_FOR_SCOPE("plugin"); | 280 OPEN_ELEMENT_FOR_SCOPE("plugin"); |
281 | 281 |
282 // Plugin name and filename are hashed for the privacy of those | 282 // Plugin name and filename are hashed for the privacy of those |
283 // testing unreleased new extensions. | 283 // testing unreleased new extensions. |
284 WriteAttribute("name", CreateBase64Hash(UTF16ToUTF8(iter->name))); | 284 WriteAttribute("name", CreateBase64Hash(UTF16ToUTF8(iter->name))); |
285 WriteAttribute("filename", | 285 WriteAttribute("filename", |
286 CreateBase64Hash(WideToUTF8(iter->path.BaseName().ToWStringHack()))); | 286 CreateBase64Hash(UTF16ToUTF8(iter->path.BaseName().LossyDisplayName()))) ; |
Mark Mentovai
2011/02/01 22:54:55
Watch the 80.
This is not for display and is thus
| |
287 WriteAttribute("version", UTF16ToUTF8(iter->version)); | 287 WriteAttribute("version", UTF16ToUTF8(iter->version)); |
288 } | 288 } |
289 } | 289 } |
290 | 290 |
291 void MetricsLog::WriteInstallElement() { | 291 void MetricsLog::WriteInstallElement() { |
292 OPEN_ELEMENT_FOR_SCOPE("install"); | 292 OPEN_ELEMENT_FOR_SCOPE("install"); |
293 WriteAttribute("installdate", GetInstallDate()); | 293 WriteAttribute("installdate", GetInstallDate()); |
294 WriteIntAttribute("buildid", 0); // We're using appversion instead. | 294 WriteIntAttribute("buildid", 0); // We're using appversion instead. |
295 } | 295 } |
296 | 296 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 const std::string result_type(AutocompleteMatch::TypeToString(i->type)); | 480 const std::string result_type(AutocompleteMatch::TypeToString(i->type)); |
481 if (!result_type.empty()) | 481 if (!result_type.empty()) |
482 WriteAttribute("resulttype", result_type); | 482 WriteAttribute("resulttype", result_type); |
483 WriteIntAttribute("relevance", i->relevance); | 483 WriteIntAttribute("relevance", i->relevance); |
484 WriteIntAttribute("isstarred", i->starred ? 1 : 0); | 484 WriteIntAttribute("isstarred", i->starred ? 1 : 0); |
485 } | 485 } |
486 } | 486 } |
487 | 487 |
488 ++num_events_; | 488 ++num_events_; |
489 } | 489 } |
OLD | NEW |