Index: components/infobars/core/simple_alert_infobar_delegate.h |
diff --git a/components/infobars/core/simple_alert_infobar_delegate.h b/components/infobars/core/simple_alert_infobar_delegate.h |
index f2cd45458e280d11708112bdd1ccfc309925ff22..eafc209bb35553ab7e19acc297dfb5f807efa055 100644 |
--- a/components/infobars/core/simple_alert_infobar_delegate.h |
+++ b/components/infobars/core/simple_alert_infobar_delegate.h |
@@ -20,26 +20,31 @@ class SimpleAlertInfoBarDelegate : public ConfirmInfoBarDelegate { |
// Creates a simple alert infobar and delegate and adds the infobar to |
// |infobar_manager|. If |vector_icon_id| is not VECTOR_ICON_NONE, it will be |
// shown; otherwise, |icon_id| (if present) will be used as the icon. |
+ // |infobar_identifier| names what class triggered the infobar for metrics. |
static void Create(infobars::InfoBarManager* infobar_manager, |
+ const std::string& infobar_identifier, |
int icon_id, |
gfx::VectorIconId vector_icon_id, |
const base::string16& message, |
bool auto_expire); |
private: |
- SimpleAlertInfoBarDelegate(int icon_id, |
+ SimpleAlertInfoBarDelegate(const std::string& infobar_identifier, |
+ int icon_id, |
gfx::VectorIconId vector_icon_id, |
const base::string16& message, |
bool auto_expire); |
~SimpleAlertInfoBarDelegate() override; |
// ConfirmInfoBarDelegate: |
+ std::string GetIdentifier() const override; |
int GetIconId() const override; |
gfx::VectorIconId GetVectorIconId() const override; |
bool ShouldExpire(const NavigationDetails& details) const override; |
base::string16 GetMessageText() const override; |
int GetButtons() const override; |
+ const std::string infobar_identifier_; |
const int icon_id_; |
gfx::VectorIconId vector_icon_id_; |
base::string16 message_; |