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

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

Issue 2184823007: Add a feature which, when enabled, blocks permissions after X prompt dismissals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 4 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_context_base.h
diff --git a/chrome/browser/permissions/permission_context_base.h b/chrome/browser/permissions/permission_context_base.h
index 2ab7b7bb8526f3d9729344db2b68602770009fdc..74127257ae67d55dd0878d81453f3be8aad4fbd7 100644
--- a/chrome/browser/permissions/permission_context_base.h
+++ b/chrome/browser/permissions/permission_context_base.h
@@ -9,9 +9,11 @@
#include "base/callback.h"
#include "base/containers/scoped_ptr_hash_map.h"
+#include "base/lazy_instance.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "build/build_config.h"
+#include "chrome/browser/permissions/permission_decision_auto_blocker.h"
#include "chrome/browser/permissions/permission_request.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
@@ -157,9 +159,14 @@ class PermissionContextBase : public KeyedService {
}
private:
+ friend class PermissionContextBaseTests;
+
// Called when a request is no longer used so it can be cleaned up.
void CleanUpRequest(const PermissionRequestID& id);
+ base::LazyInstance<PermissionDecisionAutoBlocker> decision_auto_blocker_ =
raymes 2016/08/06 00:50:21 I think we can just use a unique_ptr here (or inst
dominickn 2016/08/08 02:18:28 Done.
+ LAZY_INSTANCE_INITIALIZER;
+
Profile* profile_;
const content::PermissionType permission_type_;
const ContentSettingsType content_settings_type_;

Powered by Google App Engine
This is Rietveld 408576698