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

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

Issue 371933002: Add UMA for the new generic permisison class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_bubble_request_impl.h
diff --git a/chrome/browser/content_settings/permission_bubble_request_impl.h b/chrome/browser/content_settings/permission_bubble_request_impl.h
index fe73c64cdf3548e24d9d023c663e287fd435a7bb..89a9d601eae47d203139dd72d0d60da0ff4adb8d 100644
--- a/chrome/browser/content_settings/permission_bubble_request_impl.h
+++ b/chrome/browser/content_settings/permission_bubble_request_impl.h
@@ -18,7 +18,7 @@ class PermissionContextBase;
// caller owns it and that it can be deleted once the |delete_callback|
// is executed.
class PermissionBubbleRequestImpl : public PermissionBubbleRequest {
- public:
+ public:
typedef base::Callback<void(bool persist_permission, bool grant_permission)>
PermissionDecidedCallback;
@@ -41,11 +41,17 @@ class PermissionBubbleRequestImpl : public PermissionBubbleRequest {
// TODO(miguelg) Change this method to GetOrigin()
virtual GURL GetRequestingHostname() const OVERRIDE;
+
+ // Remember to call RegisterActionTaken for these methods if you are
+ // overriding them.
virtual void PermissionGranted() OVERRIDE;
virtual void PermissionDenied() OVERRIDE;
virtual void Cancelled() OVERRIDE;
virtual void RequestFinished() OVERRIDE;
+ protected:
+ void RegisterActionTaken() { action_taken_ = true; }
+
private:
GURL request_origin_;
bool user_gesture_;
@@ -59,6 +65,7 @@ class PermissionBubbleRequestImpl : public PermissionBubbleRequest {
// the caller.
const base::Closure delete_callback_;
bool is_finished_;
+ bool action_taken_;
DISALLOW_COPY_AND_ASSIGN(PermissionBubbleRequestImpl);
};

Powered by Google App Engine
This is Rietveld 408576698