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

Side by Side Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp

Issue 1862953002: Disallow use of Web Bluetooth from cross-origin iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Add a test. Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/bluetooth/BluetoothError.h" 5 #include "modules/bluetooth/BluetoothError.h"
6 6
7 #include "core/dom/DOMException.h" 7 #include "core/dom/DOMException.h"
8 #include "core/dom/ExceptionCode.h" 8 #include "core/dom/ExceptionCode.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 MAP_ERROR(GATT_NOT_SUPPORTED, NotSupportedError, "GATT Error: Not suppor ted."); 65 MAP_ERROR(GATT_NOT_SUPPORTED, NotSupportedError, "GATT Error: Not suppor ted.");
66 MAP_ERROR(GATT_UNTRANSLATED_ERROR_CODE, NotSupportedError, "GATT Error: Unknown GattErrorCode."); 66 MAP_ERROR(GATT_UNTRANSLATED_ERROR_CODE, NotSupportedError, "GATT Error: Unknown GattErrorCode.");
67 67
68 // SecurityErrors: 68 // SecurityErrors:
69 MAP_ERROR(GATT_NOT_AUTHORIZED, SecurityError, "GATT operation not author ized."); 69 MAP_ERROR(GATT_NOT_AUTHORIZED, SecurityError, "GATT operation not author ized.");
70 MAP_ERROR(BLACKLISTED_CHARACTERISTIC_UUID, SecurityError, "getCharacteri stic(s) called with blacklisted UUID. https://goo.gl/4NeimX"); 70 MAP_ERROR(BLACKLISTED_CHARACTERISTIC_UUID, SecurityError, "getCharacteri stic(s) called with blacklisted UUID. https://goo.gl/4NeimX");
71 MAP_ERROR(BLACKLISTED_READ, SecurityError, "readValue() called on blackl isted object marked exclude-reads. https://goo.gl/4NeimX"); 71 MAP_ERROR(BLACKLISTED_READ, SecurityError, "readValue() called on blackl isted object marked exclude-reads. https://goo.gl/4NeimX");
72 MAP_ERROR(BLACKLISTED_WRITE, SecurityError, "writeValue() called on blac klisted object marked exclude-writes. https://goo.gl/4NeimX"); 72 MAP_ERROR(BLACKLISTED_WRITE, SecurityError, "writeValue() called on blac klisted object marked exclude-writes. https://goo.gl/4NeimX");
73 MAP_ERROR(NOT_ALLOWED_TO_ACCESS_SERVICE, SecurityError, "Origin is not a llowed to access the service. Remember to add the service to a filter or to opti onalServices in requestDevice()."); 73 MAP_ERROR(NOT_ALLOWED_TO_ACCESS_SERVICE, SecurityError, "Origin is not a llowed to access the service. Remember to add the service to a filter or to opti onalServices in requestDevice().");
74 MAP_ERROR(REQUEST_DEVICE_WITH_BLACKLISTED_UUID, SecurityError, "requestD evice() called with a filter containing a blacklisted UUID. https://goo.gl/4Neim X"); 74 MAP_ERROR(REQUEST_DEVICE_WITH_BLACKLISTED_UUID, SecurityError, "requestD evice() called with a filter containing a blacklisted UUID. https://goo.gl/4Neim X");
75 MAP_ERROR(REQUEST_DEVICE_WITH_UNIQUE_ORIGIN, SecurityError, "requestDevi ce() called from sandboxed or otherwise unique origin."); 75 MAP_ERROR(REQUEST_DEVICE_FROM_CROSS_ORIGIN_IFRAME, SecurityError, "reque stDevice() called from cross-origin iframe.");
76 MAP_ERROR(REQUEST_DEVICE_WITHOUT_FRAME, SecurityError, "No window to sho w the requestDevice() dialog."); 76 MAP_ERROR(REQUEST_DEVICE_WITHOUT_FRAME, SecurityError, "No window to sho w the requestDevice() dialog.");
77 77
78 #undef MAP_ERROR 78 #undef MAP_ERROR
79 } 79 }
80 80
81 ASSERT_NOT_REACHED(); 81 ASSERT_NOT_REACHED();
82 return DOMException::create(UnknownError); 82 return DOMException::create(UnknownError);
83 } 83 }
84 84
85 } // namespace blink 85 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698