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

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

Issue 2678253002: Add metrics for Safe Browsing blacklist response. (Closed)
Patch Set: Rebase Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_blacklist_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1d3f080627921215aa2fb06d35d844208f907915 100644
--- a/chrome/browser/permissions/permission_blacklist_client.h
+++ b/chrome/browser/permissions/permission_blacklist_client.h
@@ -5,9 +5,10 @@
#ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_BLACKLIST_CLIENT_H_
#define CHROME_BROWSER_PERMISSIONS_PERMISSION_BLACKLIST_CLIENT_H_
+#include <memory>
+
#include "base/callback.h"
#include "base/memory/ref_counted.h"
-#include "chrome/browser/permissions/permission_util.h"
#include "components/safe_browsing_db/database_manager.h"
#include "content/public/browser/permission_type.h"
#include "content/public/browser/web_contents_observer.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
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_blacklist_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698