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

Unified Diff: components/infobars/core/infobar_delegate.h

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: components/infobars/core/infobar_delegate.h
diff --git a/components/infobars/core/infobar_delegate.h b/components/infobars/core/infobar_delegate.h
index bed797f461274d2990cb5e3fe4679f14cd21b819..6f62ab1550c566fdf44cd8e265680d81dbc1a85f 100644
--- a/components/infobars/core/infobar_delegate.h
+++ b/components/infobars/core/infobar_delegate.h
@@ -83,6 +83,12 @@ class InfoBarDelegate {
// as background color) of the infobar.
virtual Type GetInfoBarType() const;
+ // Returns a unique string identifying the infobar.
+ // Implementers must update the InfoBarType enum in histograms.xml with the
+ // string provided by this function as the key and
+ // base::HashMetricName(string) as its value.
+ virtual std::string GetIdentifier() const = 0;
+
virtual InfoBarAutomationType GetInfoBarAutomationType() const;
// Returns the resource ID of the icon to be shown for this InfoBar. If the

Powered by Google App Engine
This is Rietveld 408576698