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

Side by Side Diff: chrome/browser/conflicts/third_party_metrics_recorder_win.h

Issue 2854983002: Add the ThirdPartyModules.Uninstallable histogram. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CONFLICTS_THIRD_PARTY_METRICS_RECORDER_WIN_H_
6 #define CHROME_BROWSER_CONFLICTS_THIRD_PARTY_METRICS_RECORDER_WIN_H_
7
8 #include "base/macros.h"
9 #include "chrome/browser/conflicts/installed_programs_win.h"
10 #include "chrome/browser/conflicts/module_database_observer_win.h"
11 #include "chrome/browser/conflicts/module_info_win.h"
12
13 class ModuleDatabase;
14
15 // Records metrics about third party modules loaded into Chrome.
16 class ThirdPartyMetricsRecorder : public ModuleDatabaseObserver {
17 public:
18 explicit ThirdPartyMetricsRecorder(ModuleDatabase* module_database);
19 ~ThirdPartyMetricsRecorder();
20
21 // ModuleDatabaseObserver:
22 void OnNewModuleFound(const ModuleInfoKey& module_key,
23 const ModuleInfoData& module_data) override;
24
25 private:
26 void OnInstalledProgramsInitialized(ModuleDatabase* module_database);
27
28 // Returns true if |module_data| is a third party module. Third party modules
29 // are defined as not being signed by Google or Microsoft.
30 bool IsThirdPartyModule(const ModuleInfoData& module_data);
31
32 InstalledPrograms installed_programs_;
33
34 DISALLOW_COPY_AND_ASSIGN(ThirdPartyMetricsRecorder);
35 };
36
37 #endif // CHROME_BROWSER_CONFLICTS_THIRD_PARTY_METRICS_RECORDER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698