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

Unified Diff: chrome/browser/guestview/webview/webview_guest.h

Issue 69913002: Add UMA for <webview> APIs: a. ClearData, b. when Permission request is allowed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shorten UMA string literals Created 7 years, 1 month 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/guestview/webview/webview_guest.h
diff --git a/chrome/browser/guestview/webview/webview_guest.h b/chrome/browser/guestview/webview/webview_guest.h
index 386d0f6f03f4f4d3a876ba71fa2038db1de89b65..8354db7c057389d17dcebc50e939ea2efb34a21b 100644
--- a/chrome/browser/guestview/webview/webview_guest.h
+++ b/chrome/browser/guestview/webview/webview_guest.h
@@ -122,6 +122,20 @@ class WebViewGuest : public GuestView,
private:
virtual ~WebViewGuest();
+ // A map to store the callback for a request keyed by the request's id.
+ struct PermissionResponseInfo {
+ PermissionResponseCallback callback;
+ BrowserPluginPermissionType permission_type;
+ bool allowed_by_default;
+ PermissionResponseInfo();
+ PermissionResponseInfo(const PermissionResponseCallback& callback,
+ BrowserPluginPermissionType permission_type,
+ bool allowed_by_default);
+ ~PermissionResponseInfo();
+ };
+
+ static void RecordUserInitiatedUMA(const PermissionResponseInfo& info,
+ bool allow);
// WebContentsObserver implementation.
virtual void DidCommitProvisionalLoadForFrame(
int64 frame_id,
@@ -175,15 +189,6 @@ class WebViewGuest : public GuestView,
// We only need the ids to be unique for a given WebViewGuest.
int next_permission_request_id_;
- // A map to store the callback for a request keyed by the request's id.
- struct PermissionResponseInfo {
- PermissionResponseCallback callback;
- bool allowed_by_default;
- PermissionResponseInfo();
- PermissionResponseInfo(const PermissionResponseCallback& callback,
- bool allowed_by_default);
- ~PermissionResponseInfo();
- };
typedef std::map<int, PermissionResponseInfo> RequestMap;
RequestMap pending_permission_requests_;
« no previous file with comments | « chrome/browser/guestview/webview/plugin_permission_helper.cc ('k') | chrome/browser/guestview/webview/webview_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698