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

Unified Diff: chrome/browser/enumerate_modules_model_win.cc

Issue 6061011: Make sure we don't trigger the incompatibility badge when the flag.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/enumerate_modules_model_win.cc
===================================================================
--- chrome/browser/enumerate_modules_model_win.cc (revision 70726)
+++ chrome/browser/enumerate_modules_model_win.cc (working copy)
@@ -842,19 +842,28 @@
HISTOGRAM_COUNTS_100("Conflicts.ConfirmedBadModules",
confirmed_bad_modules_detected_);
- if (!limited_mode_) {
+ // Notifications are not available in limited mode.
+ if (limited_mode_)
+ return;
+
+ NotificationService::current()->Notify(
+ NotificationType::MODULE_LIST_ENUMERATED,
+ Source<EnumerateModulesModel>(this),
+ NotificationService::NoDetails());
+
+ // Command line flag must be enabled for the notification to get sent out.
+ // Otherwise we'd get the badge (while the feature is disabled) when we
+ // navigate to about:conflicts and find confirmed matches.
+ const CommandLine& cmd_line = *CommandLine::ForCurrentProcess();
+ if (!cmd_line.HasSwitch(switches::kConflictingModulesCheck))
+ return;
+
+ if (suspected_bad_modules_detected_ || confirmed_bad_modules_detected_) {
+ bool found_confirmed_bad_modules = confirmed_bad_modules_detected_ > 0;
NotificationService::current()->Notify(
- NotificationType::MODULE_LIST_ENUMERATED,
+ NotificationType::MODULE_INCOMPATIBILITY_DETECTED,
Source<EnumerateModulesModel>(this),
- NotificationService::NoDetails());
-
- if (suspected_bad_modules_detected_ || confirmed_bad_modules_detected_) {
- bool found_confirmed_bad_modules = confirmed_bad_modules_detected_ > 0;
- NotificationService::current()->Notify(
- NotificationType::MODULE_INCOMPATIBILITY_DETECTED,
- Source<EnumerateModulesModel>(this),
- Details<bool>(&found_confirmed_bad_modules));
- }
+ Details<bool>(&found_confirmed_bad_modules));
}
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698