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

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

Issue 2064313004: Add support for obtaining AV products on Win7. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WSC is not available on Server products. Created 4 years, 6 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 | chrome/browser/metrics/antivirus_metrics_provider_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/antivirus_metrics_provider_win.h
diff --git a/chrome/browser/metrics/antivirus_metrics_provider_win.h b/chrome/browser/metrics/antivirus_metrics_provider_win.h
index 7c4ef849de126193d3f8d2068e3f4fcde404eeb1..13a6b4968eb7c06ffa6c2f36dec19a20a0955be7 100644
--- a/chrome/browser/metrics/antivirus_metrics_provider_win.h
+++ b/chrome/browser/metrics/antivirus_metrics_provider_win.h
@@ -58,12 +58,24 @@ class AntiVirusMetricsProvider : public metrics::MetricsProvider {
RESULT_PRODUCT_STATE_INVALID = 8,
RESULT_FAILED_TO_GET_PRODUCT_NAME = 9,
RESULT_FAILED_TO_GET_REMEDIATION_PATH = 10,
- RESULT_COUNT = 11
+ RESULT_FAILED_TO_CONNECT_TO_WMI = 11,
+ RESULT_FAILED_TO_SET_SECURITY_BLANKET = 12,
+ RESULT_FAILED_TO_EXEC_WMI_QUERY = 13,
+ RESULT_FAILED_TO_ITERATE_RESULTS = 14,
+ RESULT_WSC_NOT_AVAILABLE = 15,
+ RESULT_COUNT = 16
};
typedef metrics::SystemProfileProto::AntiVirusProduct AvProduct;
- static ResultCode FillAntiVirusProducts(std::vector<AvProduct>* products);
+ // Query COM interface IWSCProductList for installed AV products. This
+ // interface is only available on Windows 8 and above.
+ static ResultCode FillAntiVirusProductsFromWSC(
+ std::vector<AvProduct>* products);
+ // Query WMI ROOT\SecurityCenter2 for installed AV products. This interface is
+ // only available on Windows Vista and above.
+ static ResultCode FillAntiVirusProductsFromWMI(
+ std::vector<AvProduct>* products);
static std::vector<AvProduct> GetAntiVirusProductsOnFileThread();
// Called when metrics are done being gathered from the FILE thread.
@@ -82,6 +94,8 @@ class AntiVirusMetricsProvider : public metrics::MetricsProvider {
base::ThreadChecker thread_checker_;
base::WeakPtrFactory<AntiVirusMetricsProvider> weak_ptr_factory_;
+ FRIEND_TEST_ALL_PREFIXES(AntiVirusMetricsProviderTest, GetMetricsFullName);
+
DISALLOW_COPY_AND_ASSIGN(AntiVirusMetricsProvider);
};
« no previous file with comments | « no previous file | chrome/browser/metrics/antivirus_metrics_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698