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

Unified Diff: chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.cc

Issue 325893002: Bluetooth: add socket & low_energy manifest check (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add permission denied tests Created 6 years, 6 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/common/extensions/api/bluetooth/bluetooth_manifest_data.cc
diff --git a/chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.cc b/chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.cc
index 0b0bb58984b5fd097461c18f411de6d8e9d5ba4a..e7b92132fdf4ae3d353b8e84a7f47485c2613de8 100644
--- a/chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.cc
+++ b/chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.cc
@@ -32,6 +32,20 @@ bool BluetoothManifestData::CheckRequest(
}
// static
+bool BluetoothManifestData::CheckSocketPermitted(
+ const Extension* extension) {
+ const BluetoothManifestData* data = BluetoothManifestData::Get(extension);
+ return data && data->permission()->CheckSocketPermitted(extension);
+}
+
+// static
+bool BluetoothManifestData::CheckLowEnergyPermitted(
+ const Extension* extension) {
+ const BluetoothManifestData* data = BluetoothManifestData::Get(extension);
+ return data && data->permission()->CheckLowEnergyPermitted(extension);
+}
+
+// static
scoped_ptr<BluetoothManifestData> BluetoothManifestData::FromValue(
const base::Value& value,
base::string16* error) {

Powered by Google App Engine
This is Rietveld 408576698