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

Unified Diff: chrome/browser/extensions/api/bluetooth/bluetooth_api.cc

Issue 145663004: Replace "bluetooth" permission with manifest property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/extensions/api/bluetooth/bluetooth_api.cc
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc
index 5790a70fca9685dfa51b07d98e168a62d1cac121..a58ca17afcc28ebbc89ccba63aaf462c2da14f4f 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/bluetooth.h"
-#include "chrome/common/extensions/permissions/bluetooth_permission.h"
+#include "chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.h"
#include "content/public/browser/browser_thread.h"
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_device.h"
@@ -125,10 +125,9 @@ bool BluetoothAddProfileFunction::RunImpl() {
return false;
}
- BluetoothPermission::CheckParam param(params->profile.uuid);
- if (!PermissionsData::CheckAPIPermissionWithParam(
- GetExtension(), APIPermission::kBluetooth, &param)) {
- SetError(kPermissionDenied);
+ BluetoothPermissionRequest param(params->profile.uuid);
+ if (!BluetoothManifestData::CheckRequest(GetExtension(), param)) {
+ error_ = kPermissionDenied;
return false;
}
« no previous file with comments | « no previous file | chrome/chrome_common.gypi » ('j') | chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698