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

Side by Side Diff: content/browser/bluetooth/bluetooth_blacklist.cc

Issue 2302693002: bluetooth: web: Update Blacklist with Cypress & FIDO services. (Closed)
Patch Set: fix test Created 4 years, 3 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
« no previous file with comments | « no previous file | content/browser/bluetooth/bluetooth_blacklist_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/browser/bluetooth/bluetooth_blacklist.h" 5 #include "content/browser/bluetooth/bluetooth_blacklist.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/optional.h" 9 #include "base/optional.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // offer the full integration test to the Web Bluetooth Javascript bindings. 147 // offer the full integration test to the Web Bluetooth Javascript bindings.
148 // 148 //
149 // This is done for simplicity as opposed to exposing a testing API that can 149 // This is done for simplicity as opposed to exposing a testing API that can
150 // add to the blacklist over time, which would be over engineered. 150 // add to the blacklist over time, which would be over engineered.
151 // 151 //
152 // Remove testing UUIDs if the specified blacklist is updated to include UUIDs 152 // Remove testing UUIDs if the specified blacklist is updated to include UUIDs
153 // that match the specific permutations. 153 // that match the specific permutations.
154 DCHECK(BluetoothUUID("00001800-0000-1000-8000-00805f9b34fb") == 154 DCHECK(BluetoothUUID("00001800-0000-1000-8000-00805f9b34fb") ==
155 BluetoothUUID("1800")); 155 BluetoothUUID("1800"));
156 156
157 // Blacklist UUIDs updated 2016-04-07 from: 157 // Blacklist UUIDs updated 2016-09-01 from:
158 // https://github.com/WebBluetoothCG/registries/blob/master/gatt_blacklist.txt 158 // https://github.com/WebBluetoothCG/registries/blob/master/gatt_blacklist.txt
159 // Short UUIDs are used for readability of this list. 159 // Short UUIDs are used for readability of this list.
160 // 160 //
161 // Services: 161 // Services:
162 Add(BluetoothUUID("1812"), Value::EXCLUDE); 162 Add(BluetoothUUID("1812"), Value::EXCLUDE);
163 Add(BluetoothUUID("00001530-1212-efde-1523-785feabcd123"), Value::EXCLUDE); 163 Add(BluetoothUUID("00001530-1212-efde-1523-785feabcd123"), Value::EXCLUDE);
164 Add(BluetoothUUID("f000ffc0-0451-4000-b000-000000000000"), Value::EXCLUDE); 164 Add(BluetoothUUID("f000ffc0-0451-4000-b000-000000000000"), Value::EXCLUDE);
165 Add(BluetoothUUID("00060000"), Value::EXCLUDE);
166 Add(BluetoothUUID("fffd"), Value::EXCLUDE);
165 // Characteristics: 167 // Characteristics:
166 Add(BluetoothUUID("2a02"), Value::EXCLUDE_WRITES); 168 Add(BluetoothUUID("2a02"), Value::EXCLUDE_WRITES);
167 Add(BluetoothUUID("2a03"), Value::EXCLUDE); 169 Add(BluetoothUUID("2a03"), Value::EXCLUDE);
168 Add(BluetoothUUID("2a25"), Value::EXCLUDE); 170 Add(BluetoothUUID("2a25"), Value::EXCLUDE);
169 // Characteristics for Layout Tests: 171 // Characteristics for Layout Tests:
170 Add(BluetoothUUID("bad1c9a2-9a5b-4015-8b60-1579bbbf2135"), 172 Add(BluetoothUUID("bad1c9a2-9a5b-4015-8b60-1579bbbf2135"),
171 Value::EXCLUDE_READS); 173 Value::EXCLUDE_READS);
172 // Descriptors: 174 // Descriptors:
173 Add(BluetoothUUID("2902"), Value::EXCLUDE_WRITES); 175 Add(BluetoothUUID("2902"), Value::EXCLUDE_WRITES);
174 Add(BluetoothUUID("2903"), Value::EXCLUDE_WRITES); 176 Add(BluetoothUUID("2903"), Value::EXCLUDE_WRITES);
175 // Descriptors for Layout Tests: 177 // Descriptors for Layout Tests:
176 Add(BluetoothUUID("bad2ddcf-60db-45cd-bef9-fd72b153cf7c"), Value::EXCLUDE); 178 Add(BluetoothUUID("bad2ddcf-60db-45cd-bef9-fd72b153cf7c"), Value::EXCLUDE);
177 Add(BluetoothUUID("bad3ec61-3cc3-4954-9702-7977df514114"), 179 Add(BluetoothUUID("bad3ec61-3cc3-4954-9702-7977df514114"),
178 Value::EXCLUDE_READS); 180 Value::EXCLUDE_READS);
179 } 181 }
180 182
181 void BluetoothBlacklist::PopulateWithServerProvidedValues() { 183 void BluetoothBlacklist::PopulateWithServerProvidedValues() {
182 // DCHECK to maybe help debug https://crbug.com/604078. 184 // DCHECK to maybe help debug https://crbug.com/604078.
183 DCHECK(GetContentClient()); 185 DCHECK(GetContentClient());
184 Add(GetContentClient()->browser()->GetWebBluetoothBlacklist()); 186 Add(GetContentClient()->browser()->GetWebBluetoothBlacklist());
185 } 187 }
186 188
187 } // namespace content 189 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/bluetooth/bluetooth_blacklist_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698