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

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

Issue 1560263002: Store Bluetooth permissions in website settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: modified ChooserPermissionManager to take url::Origin as parameter Created 4 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/chooser_permission_manager.h
diff --git a/chrome/browser/permissions/chooser_permission_manager.h b/chrome/browser/permissions/chooser_permission_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..916b5aa539a0232115791bf6d427bb358c8e265b
--- /dev/null
+++ b/chrome/browser/permissions/chooser_permission_manager.h
@@ -0,0 +1,35 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PERMISSIONS_CHOOSER_PERMISSION_MANAGER_H_
+#define CHROME_BROWSER_PERMISSIONS_CHOOSER_PERMISSION_MANAGER_H_
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
Jeffrey Yasskin 2016/01/21 00:32:30 You're not using this #include.
juncai 2016/01/25 18:53:32 Done.
+#include "components/keyed_service/core/keyed_service.h"
+#include "content/public/browser/chooser_permission_manager.h"
+
+class Profile;
+
+class ChooserPermissionManager : public KeyedService,
Jeffrey Yasskin 2016/01/21 00:32:30 I believe we generally call this class "ChromeChoo
juncai 2016/01/25 18:53:31 Yes, :).
+ public content::ChooserPermissionManager {
+ public:
+ explicit ChooserPermissionManager(Profile* profile);
+ ~ChooserPermissionManager() override;
+
+ // content::ChooserPermissionManager:
+ void GrantPermission(const url::Origin& requesting_origin,
+ const url::Origin& embedding_origin,
+ const std::string& id) override;
+ void RevokePermission(const url::Origin& requesting_origin,
+ const url::Origin& embedding_origin,
+ const std::string& id) override;
+
+ private:
+ Profile* profile_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChooserPermissionManager);
+};
+
+#endif // CHROME_BROWSER_PERMISSIONS_CHOOSER_PERMISSION_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698