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

Unified Diff: content/shell/browser/layout_test/layout_test_permission_manager.h

Issue 1099943003: Notifications: use LayoutTestPermissionManager to handle permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_midiclientmock
Patch Set: Created 5 years, 8 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: content/shell/browser/layout_test/layout_test_permission_manager.h
diff --git a/content/shell/browser/layout_test/layout_test_permission_manager.h b/content/shell/browser/layout_test/layout_test_permission_manager.h
index e1cf5c177fda9a01416649b5ce80bd0772022143..9c0461f7788d6aa3f6a8a70f9a36408dd6ba40cc 100644
--- a/content/shell/browser/layout_test/layout_test_permission_manager.h
+++ b/content/shell/browser/layout_test/layout_test_permission_manager.h
@@ -8,6 +8,7 @@
#include "base/callback_forward.h"
#include "base/containers/hash_tables.h"
#include "base/macros.h"
+#include "base/synchronization/lock.h"
#include "content/public/browser/permission_manager.h"
#include "url/gurl.h"
@@ -74,6 +75,10 @@ class LayoutTestPermissionManager : public PermissionManager {
PermissionStatus,
PermissionDescription::Hash>;
+ // Mutex for permissions access. Unfortunately, the permissions can be
+ // accessed from the IO thread because of Notifications' synchronous IPC.
+ base::Lock permissions_lock_;
+
// List of permissions currently known by the LayoutTestPermissionManager and
// their associated |PermissionStatus|.
PermissionsMap permissions_;

Powered by Google App Engine
This is Rietveld 408576698