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

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

Issue 1096393002: API stubs for the BLE advertisement API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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: extensions/common/api/bluetooth/bluetooth_manifest_data.cc
diff --git a/extensions/common/api/bluetooth/bluetooth_manifest_data.cc b/extensions/common/api/bluetooth/bluetooth_manifest_data.cc
index 4d777cf1e8516b4fdeb1a873c07e5e79e8e01b76..cb85e08ba65ebaa440b53ed0a84415e23134931f 100644
--- a/extensions/common/api/bluetooth/bluetooth_manifest_data.cc
+++ b/extensions/common/api/bluetooth/bluetooth_manifest_data.cc
@@ -46,6 +46,14 @@ bool BluetoothManifestData::CheckLowEnergyPermitted(
}
// static
+bool BluetoothManifestData::CheckPeripheralPermitted(
+ const Extension* extension) {
+ const BluetoothManifestData* data = BluetoothManifestData::Get(extension);
+ return data && data->permission()->CheckLowEnergyPermitted(extension) &&
+ data->permission()->CheckPeripheralPermitted(extension);
+}
+
+// static
scoped_ptr<BluetoothManifestData> BluetoothManifestData::FromValue(
const base::Value& value,
base::string16* error) {

Powered by Google App Engine
This is Rietveld 408576698