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

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

Issue 1866853002: Add the Nordic and TI firmware update services to the Bluetooth blacklist. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: 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
« 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/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "content/common/bluetooth/bluetooth_scan_filter.h" 10 #include "content/common/bluetooth/bluetooth_scan_filter.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 PopulateWithDefaultValues(); 129 PopulateWithDefaultValues();
130 } 130 }
131 131
132 BluetoothBlacklist::BluetoothBlacklist() { 132 BluetoothBlacklist::BluetoothBlacklist() {
133 PopulateWithDefaultValues(); 133 PopulateWithDefaultValues();
134 } 134 }
135 135
136 void BluetoothBlacklist::PopulateWithDefaultValues() { 136 void BluetoothBlacklist::PopulateWithDefaultValues() {
137 blacklisted_uuids_.clear(); 137 blacklisted_uuids_.clear();
138 138
139 // Blacklist UUIDs updated 2016-02-12 from: 139 // Blacklist UUIDs updated 2016-02-12 from:
scheib 2016/04/07 00:23:22 Updated date needs updating. Possibly to the curre
Jeffrey Yasskin 2016/04/07 15:38:20 Done; moved it to next to the actual blacklist.
140 // https://github.com/WebBluetoothCG/registries/blob/master/gatt_blacklist.txt 140 // https://github.com/WebBluetoothCG/registries/blob/master/gatt_blacklist.txt
141 // Short UUIDs are used for readability of this list. 141 // Short UUIDs are used for readability of this list.
142 // 142 //
143 // Testing from Layout Tests Note: 143 // Testing from Layout Tests Note:
144 // 144 //
145 // Random UUIDs for object & exclude permutations that do not exist in the 145 // Random UUIDs for object & exclude permutations that do not exist in the
146 // standard blacklist are included to facilitate integration testing from 146 // standard blacklist are included to facilitate integration testing from
147 // Layout Tests. Unit tests can dynamically modify the blacklist, but don't 147 // Layout Tests. Unit tests can dynamically modify the blacklist, but don't
148 // offer the full integration test to the Web Bluetooth Javascript bindings. 148 // offer the full integration test to the Web Bluetooth Javascript bindings.
149 // 149 //
150 // This is done for simplicity as opposed to exposing a testing API that can 150 // This is done for simplicity as opposed to exposing a testing API that can
151 // add to the blacklist over time, which would be over engineered. 151 // add to the blacklist over time, which would be over engineered.
152 // 152 //
153 // Remove testing UUIDs if the specified blacklist is updated to include UUIDs 153 // Remove testing UUIDs if the specified blacklist is updated to include UUIDs
154 // that match the specific permutations. 154 // that match the specific permutations.
155 DCHECK(BluetoothUUID("00001800-0000-1000-8000-00805f9b34fb") == 155 DCHECK(BluetoothUUID("00001800-0000-1000-8000-00805f9b34fb") ==
156 BluetoothUUID("1800")); 156 BluetoothUUID("1800"));
157 // Services: 157 // Services:
158 Add(BluetoothUUID("1812"), Value::EXCLUDE); 158 Add(BluetoothUUID("1812"), Value::EXCLUDE);
159 Add(BluetoothUUID("00001530-1212-efde-1523-785feabcd123"), Value::EXCLUDE);
160 Add(BluetoothUUID("f000ffc0-0451-4000-b000-000000000000"), Value::EXCLUDE);
159 // Characteristics: 161 // Characteristics:
160 Add(BluetoothUUID("2a02"), Value::EXCLUDE_WRITES); 162 Add(BluetoothUUID("2a02"), Value::EXCLUDE_WRITES);
161 Add(BluetoothUUID("2a03"), Value::EXCLUDE); 163 Add(BluetoothUUID("2a03"), Value::EXCLUDE);
162 Add(BluetoothUUID("2a25"), Value::EXCLUDE); 164 Add(BluetoothUUID("2a25"), Value::EXCLUDE);
163 // Characteristics for Layout Tests: 165 // Characteristics for Layout Tests:
164 Add(BluetoothUUID("bad1c9a2-9a5b-4015-8b60-1579bbbf2135"), 166 Add(BluetoothUUID("bad1c9a2-9a5b-4015-8b60-1579bbbf2135"),
165 Value::EXCLUDE_READS); 167 Value::EXCLUDE_READS);
166 // Descriptors: 168 // Descriptors:
167 Add(BluetoothUUID("2902"), Value::EXCLUDE_WRITES); 169 Add(BluetoothUUID("2902"), Value::EXCLUDE_WRITES);
168 Add(BluetoothUUID("2903"), Value::EXCLUDE_WRITES); 170 Add(BluetoothUUID("2903"), Value::EXCLUDE_WRITES);
169 // Descriptors for Layout Tests: 171 // Descriptors for Layout Tests:
170 Add(BluetoothUUID("bad2ddcf-60db-45cd-bef9-fd72b153cf7c"), Value::EXCLUDE); 172 Add(BluetoothUUID("bad2ddcf-60db-45cd-bef9-fd72b153cf7c"), Value::EXCLUDE);
171 Add(BluetoothUUID("bad3ec61-3cc3-4954-9702-7977df514114"), 173 Add(BluetoothUUID("bad3ec61-3cc3-4954-9702-7977df514114"),
172 Value::EXCLUDE_READS); 174 Value::EXCLUDE_READS);
173 } 175 }
174 176
175 } // namespace content 177 } // 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