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

Unified Diff: chrome/browser/content_settings/permission_infobar_delegate.h

Issue 371933002: Add UMA for the new generic permisison class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rework the UMA based on mpearsons suggestion. Add extra UMA for ignored and dismissed requests Created 6 years, 5 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/content_settings/permission_infobar_delegate.h
diff --git a/chrome/browser/content_settings/permission_infobar_delegate.h b/chrome/browser/content_settings/permission_infobar_delegate.h
index cdb8c2079721cae9ab2f5a8d254c28fa382990d6..af94ac4fdde86ab4cf55dafb70dd302aa9cb7f6c 100644
--- a/chrome/browser/content_settings/permission_infobar_delegate.h
+++ b/chrome/browser/content_settings/permission_infobar_delegate.h
@@ -7,6 +7,7 @@
#include "chrome/browser/content_settings/permission_request_id.h"
#include "chrome/browser/infobars/infobar_service.h"
+#include "chrome/common/content_settings_types.h"
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "content/public/browser/web_contents.h"
@@ -22,24 +23,31 @@ class PermissionInfobarDelegate : public ConfirmInfoBarDelegate {
protected:
PermissionInfobarDelegate(PermissionQueueController* controller,
const PermissionRequestID& id,
- const GURL& requesting_origin);
+ const GURL& requesting_origin,
+ ContentSettingsType type);
virtual ~PermissionInfobarDelegate();
// ConfirmInfoBarDelegate:
virtual base::string16 GetMessageText() const = 0;
- virtual void InfoBarDismissed() OVERRIDE;
virtual infobars::InfoBarDelegate::Type GetInfoBarType() const OVERRIDE;
virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
+
+ // Remember to call RegisterActionTaken for these methods if you are
+ // overriding them.
+ virtual void InfoBarDismissed() OVERRIDE;
virtual bool Accept() OVERRIDE;
virtual bool Cancel() OVERRIDE;
+ void RegisterActionTaken() {action_taken_ = true; }
Bernhard Bauer 2014/07/14 15:22:15 Nit: space before brace, and empty line.
Miguel Garcia 2014/07/14 16:57:50 Done and moved it to protected too
private:
void SetPermission(bool update_content_setting, bool allowed);
PermissionQueueController* controller_; // not owned by us
const PermissionRequestID id_;
GURL requesting_origin_;
+ bool action_taken_;
+ ContentSettingsType type_;
DISALLOW_COPY_AND_ASSIGN(PermissionInfobarDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698