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

Unified Diff: chrome/browser/plugins/plugin_observer.cc

Issue 1520543004: Add method for identifying different InfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 5 years 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/plugins/plugin_observer.cc
diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc
index 7210af3313aea52bc09e0eab2249ce6153ad49c6..7ef1fa5451427fe1a31585e474cc7968a99cdbe6 100644
--- a/chrome/browser/plugins/plugin_observer.cc
+++ b/chrome/browser/plugins/plugin_observer.cc
@@ -136,6 +136,7 @@ class ReloadPluginInfoBarDelegate : public ConfirmInfoBarDelegate {
~ReloadPluginInfoBarDelegate() override;
// ConfirmInfobarDelegate:
+ std::string GetIdentifier() const override;
int GetIconId() const override;
gfx::VectorIconId GetVectorIconId() const override;
base::string16 GetMessageText() const override;
@@ -165,6 +166,10 @@ ReloadPluginInfoBarDelegate::ReloadPluginInfoBarDelegate(
ReloadPluginInfoBarDelegate::~ReloadPluginInfoBarDelegate(){ }
+std::string ReloadPluginInfoBarDelegate::GetIdentifier() const {
+ return "ReloadPluginInfoBarDelegate";
+}
+
int ReloadPluginInfoBarDelegate::GetIconId() const {
return IDR_INFOBAR_PLUGIN_CRASHED;
}
@@ -416,6 +421,7 @@ void PluginObserver::OnCouldNotLoadPlugin(const base::FilePath& plugin_path) {
PluginService::GetInstance()->GetPluginDisplayNameByPath(plugin_path);
SimpleAlertInfoBarDelegate::Create(
InfoBarService::FromWebContents(web_contents()),
+ "PluginObserver",
IDR_INFOBAR_PLUGIN_CRASHED,
#if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_ANDROID)
gfx::VectorIconId::EXTENSION_CRASHED,

Powered by Google App Engine
This is Rietveld 408576698