Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3606)

Unified Diff: chrome/browser/metrics/antivirus_metrics_provider_win.cc

Issue 2635333002: Correctly call trim function from antivirus metrics. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/antivirus_metrics_provider_win.cc
diff --git a/chrome/browser/metrics/antivirus_metrics_provider_win.cc b/chrome/browser/metrics/antivirus_metrics_provider_win.cc
index 2328b73abbf04ebe869d2babbb6d76bd6bf7a649..d935a1412d1ff497387f642f24dfae684ff97000 100644
--- a/chrome/browser/metrics/antivirus_metrics_provider_win.cc
+++ b/chrome/browser/metrics/antivirus_metrics_provider_win.cc
@@ -296,8 +296,8 @@ AntiVirusMetricsProvider::FillAntiVirusProductsFromWSC(
result = product->get_ProductName(product_name.Receive());
if (FAILED(result))
return RESULT_FAILED_TO_GET_PRODUCT_NAME;
- std::string name =
- base::SysWideToUTF8(std::wstring(product_name, product_name.Length()));
+ std::string name = TrimVersionOfAvProductName(
+ base::SysWideToUTF8(std::wstring(product_name, product_name.Length())));
product_name.Release();
if (ShouldReportFullNames())
av_product.set_product_name(name);
@@ -427,7 +427,7 @@ AntiVirusMetricsProvider::FillAntiVirusProductsFromWMI(
// Owned by ScopedVariant.
BSTR temp_bstr = V_BSTR(display_name.ptr());
- std::string name(base::SysWideToUTF8(
+ std::string name = TrimVersionOfAvProductName(base::SysWideToUTF8(
std::wstring(temp_bstr, ::SysStringLen(temp_bstr))));
if (ShouldReportFullNames())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698