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

Unified Diff: chrome/browser/ui/views/conflicting_module_view_win.cc

Issue 2037883004: [Win] Add reporting of total number of modules loaded in browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing include. 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
Index: chrome/browser/ui/views/conflicting_module_view_win.cc
diff --git a/chrome/browser/ui/views/conflicting_module_view_win.cc b/chrome/browser/ui/views/conflicting_module_view_win.cc
index 635a076dbaf8e60817f2395c399da601db17d6cf..452e300717495aaa425b1cd42b7ca3af3026be7a 100644
--- a/chrome/browser/ui/views/conflicting_module_view_win.cc
+++ b/chrome/browser/ui/views/conflicting_module_view_win.cc
@@ -50,8 +50,8 @@ ConflictingModuleView::ConflictingModuleView(views::View* anchor_view,
set_anchor_view_insets(gfx::Insets(
GetLayoutConstant(LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET), 0));
- registrar_.Add(this, chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_ICON_CHANGE,
- content::NotificationService::AllSources());
+ // Register for notifications about conflicting modules.
+ EnumerateModulesModel::GetInstance()->AddObserver(this);
}
// static
@@ -62,7 +62,7 @@ void ConflictingModuleView::MaybeShow(Browser* browser,
return; // Only show the bubble once per launch.
EnumerateModulesModel* model = EnumerateModulesModel::GetInstance();
- GURL url = model->GetFirstNotableConflict();
+ GURL url = model->GetConflictUrl();
if (!url.is_valid()) {
done_checking = true;
return;
@@ -96,6 +96,7 @@ void ConflictingModuleView::MaybeShow(Browser* browser,
// ConflictingModuleView - private.
ConflictingModuleView::~ConflictingModuleView() {
+ EnumerateModulesModel::GetInstance()->RemoveObserver(this);
}
void ConflictingModuleView::ShowBubble() {
@@ -162,11 +163,7 @@ void ConflictingModuleView::GetAccessibleState(
state->role = ui::AX_ROLE_ALERT_DIALOG;
}
-void ConflictingModuleView::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- DCHECK_EQ(chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_ICON_CHANGE, type);
+void ConflictingModuleView::OnConflictsAcknowledged() {
EnumerateModulesModel* model = EnumerateModulesModel::GetInstance();
if (!model->ShouldShowConflictWarning())
GetWidget()->Close();

Powered by Google App Engine
This is Rietveld 408576698