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

Unified Diff: content/browser/bluetooth/bluetooth_device_chooser_controller.cc

Issue 2716583003: Rename Origin.unique() to opaque().
Patch Set: Update new uses post-rebase Created 3 years, 4 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/browser/bluetooth/bluetooth_device_chooser_controller.cc
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
index ed7de7450660e1c8274f95f1913cb45bcefe5357..3663b30982b8565f1f590bda7c665e060a02b826 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -342,15 +342,17 @@ void BluetoothDeviceChooserController::GetDevice(
// TODO(crbug.com/518042): Enforce correctly-delegated permissions instead of
// matching origins. When relaxing this, take care to handle non-sandboxed
- // unique origins.
+ // opaque origins.
if (!embedding_origin.IsSameOriginWith(requesting_origin)) {
PostErrorCallback(blink::mojom::WebBluetoothResult::
REQUEST_DEVICE_FROM_CROSS_ORIGIN_IFRAME);
return;
}
- // The above also excludes unique origins, which are not even same-origin with
+ // The above also excludes opaque origins, which are not even same-origin with
// themselves.
- DCHECK(!requesting_origin.unique());
+ // TODO: This is no longer true, and will crash here if embedding_origin is
+ // the same object as requesting_origin.
+ DCHECK(!requesting_origin.opaque());
if (!adapter_->IsPresent()) {
DVLOG(1) << "Bluetooth Adapter not present. Can't serve requestDevice.";

Powered by Google App Engine
This is Rietveld 408576698