summaryrefslogtreecommitdiffstats
path: root/chrome/browser/enumerate_modules_model_win.h
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-06 15:28:33 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-06 15:28:33 +0000
commitd04126a3612e00bb1f6b88c4bc58d1c16eeaaa67 (patch)
treee2fc74c82e6f7fe86337730ad78ed4c3a99fde3f /chrome/browser/enumerate_modules_model_win.h
parent146c1a865f9782e2d21a70cf07748b2685e0267f (diff)
downloadchromium_src-d04126a3612e00bb1f6b88c4bc58d1c16eeaaa67.zip
chromium_src-d04126a3612e00bb1f6b88c4bc58d1c16eeaaa67.tar.gz
chromium_src-d04126a3612e00bb1f6b88c4bc58d1c16eeaaa67.tar.bz2
Warn by default when certain DLL conflicts exist on XP.
BUG=238378 R=cpu@chromium.org, jhawkins@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/15969017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204505 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/enumerate_modules_model_win.h')
-rw-r--r--chrome/browser/enumerate_modules_model_win.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/chrome/browser/enumerate_modules_model_win.h b/chrome/browser/enumerate_modules_model_win.h
index 0d78ab0..1874716 100644
--- a/chrome/browser/enumerate_modules_model_win.h
+++ b/chrome/browser/enumerate_modules_model_win.h
@@ -62,6 +62,13 @@ class ModuleEnumerator : public base::RefCountedThreadSafe<ModuleEnumerator> {
DISABLE = 1 << 2,
UPDATE = 1 << 3,
SEE_LINK = 1 << 4,
+ NOTIFY_USER = 1 << 5,
+ };
+
+ // Which Windows OS is affected.
+ enum OperatingSystem {
+ ALL = -1,
+ XP = 1 << 0,
};
// The structure we populate when enumerating modules.
@@ -101,6 +108,7 @@ class ModuleEnumerator : public base::RefCountedThreadSafe<ModuleEnumerator> {
const char* desc_or_signer;
const char* version_from; // Version where conflict started.
const char* version_to; // First version that works.
+ OperatingSystem os; // Bitmask, representing what OS this entry applies to.
RecommendedAction help_tip;
};
@@ -231,8 +239,19 @@ class ModuleEnumerator : public base::RefCountedThreadSafe<ModuleEnumerator> {
// notification.
class EnumerateModulesModel {
public:
+ // UMA histogram constants.
+ enum UmaModuleConflictHistogramOptions {
+ ACTION_BUBBLE_SHOWN = 0,
+ ACTION_BUBBLE_LEARN_MORE,
+ ACTION_MENU_LEARN_MORE,
+ ACTION_BOUNDARY, // Must be the last value.
+ };
+
static EnumerateModulesModel* GetInstance();
+ // Record via UMA what the user selected.
+ static void RecordLearnMoreStat(bool from_menu);
+
// Returns true if we should show the conflict notification. The conflict
// notification is only shown once during the lifetime of the process.
bool ShouldShowConflictWarning() const;
@@ -252,12 +271,20 @@ class EnumerateModulesModel {
return confirmed_bad_modules_detected_;
}
+ // Returns how many modules to notify the user about.
+ int modules_to_notify_about() const {
+ return modules_to_notify_about_;
+ }
+
// Set to true when we the scanning process can not rely on certain Chrome
// services to exists.
void set_limited_mode(bool limited_mode) {
limited_mode_ = limited_mode;
}
+ // Checks to see if a scanning task should be started and sets one off, if so.
+ void MaybePostScanningTask();
+
// Asynchronously start the scan for the loaded module list, except when in
// limited_mode (in which case it blocks).
void ScanNow();
@@ -265,6 +292,10 @@ class EnumerateModulesModel {
// Gets the whole module list as a ListValue.
base::ListValue* GetModuleList() const;
+ // Gets the Help Center URL for the first *notable* conflict module that we've
+ // elected to notify the user about.
+ GURL GetFirstNotableConflict();
+
private:
friend struct DefaultSingletonTraits<EnumerateModulesModel>;
friend class ModuleEnumerator;
@@ -308,6 +339,9 @@ class EnumerateModulesModel {
// found during last scan.
int confirmed_bad_modules_detected_;
+ // The number of bad modules the user needs to be aggressively notified about.
+ int modules_to_notify_about_;
+
// The number of suspected bad modules (not including confirmed bad ones)
// found during last scan.
int suspected_bad_modules_detected_;