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

Unified Diff: chrome/browser/enumerate_modules_model_win.h

Issue 15969017: Warn by default when certain DLL conflicts exist on XP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Freshly sync'ed Created 7 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
Index: chrome/browser/enumerate_modules_model_win.h
diff --git a/chrome/browser/enumerate_modules_model_win.h b/chrome/browser/enumerate_modules_model_win.h
index 0d78ab07d57c11ac1e6c5fea860ed910c118d3dc..1874716dafdfd67aafb693ad16eb91e72c0e9ab8 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_;
« no previous file with comments | « chrome/browser/enumerate_modules_model_unittest_win.cc ('k') | chrome/browser/enumerate_modules_model_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698