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

Unified Diff: chrome/browser/permissions/permission_blacklist_client.h

Issue 2651163002: Add UMA for autoblocking and embargoing. (Closed)
Patch Set: Sync branch, add test Created 3 years, 11 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/permissions/permission_blacklist_client.h
diff --git a/chrome/browser/permissions/permission_blacklist_client.h b/chrome/browser/permissions/permission_blacklist_client.h
index 239614362639a43dbec14e4be4c2a5fce6400df3..8084810403513680b39424d52f359a954f76114a 100644
--- a/chrome/browser/permissions/permission_blacklist_client.h
+++ b/chrome/browser/permissions/permission_blacklist_client.h
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
+#include "chrome/browser/permissions/permission_uma_util.h"
#include "chrome/browser/permissions/permission_util.h"
#include "components/safe_browsing_db/database_manager.h"
#include "content/public/browser/permission_type.h"
@@ -20,6 +21,7 @@ class WebContents;
namespace base {
class OneShotTimer;
+class ElapsedTimer;
}
// The client used when checking whether a permission has been blacklisted by
@@ -62,7 +64,7 @@ class PermissionBlacklistClient
const GURL& url,
const safe_browsing::ThreatMetadata& metadata) override;
- void EvaluateBlacklistResultOnUiThread(bool permission_blocked);
+ void EvaluateBlacklistResultOnUiThread(bool response);
// WebContentsObserver implementation. Sets a flag so that when the database
// manager returns with a result, it won't attempt to run the callback with a
@@ -78,6 +80,7 @@ class PermissionBlacklistClient
// Timer to abort the Safe Browsing check if it takes too long. Created and
// used on the IO Thread.
std::unique_ptr<base::OneShotTimer> timer_;
+ std::unique_ptr<base::ElapsedTimer> elapsed_timer_;
int timeout_;
// True if |callback_| should be invoked, if web_contents() is destroyed, this

Powered by Google App Engine
This is Rietveld 408576698