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

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

Issue 1858633003: bluetooth: Populate Web Bluetooth blacklist from variations:: parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set adapter in tests: 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/bluetooth/bluetooth_blacklist.cc
diff --git a/content/browser/bluetooth/bluetooth_blacklist.cc b/content/browser/bluetooth/bluetooth_blacklist.cc
index 088848f420f44eb59d9288c4bfd30027f298ed1a..086861eb3b53d3f45b9f043882e044d2336b314f 100644
--- a/content/browser/bluetooth/bluetooth_blacklist.cc
+++ b/content/browser/bluetooth/bluetooth_blacklist.cc
@@ -8,6 +8,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_split.h"
#include "content/common/bluetooth/bluetooth_scan_filter.h"
+#include "content/public/browser/content_browser_client.h"
using device::BluetoothUUID;
@@ -127,10 +128,12 @@ void BluetoothBlacklist::RemoveExcludedUuids(
void BluetoothBlacklist::ResetToDefaultValuesForTest() {
blacklisted_uuids_.clear();
PopulateWithDefaultValues();
+ PopulateWithServerProvidedValues();
}
BluetoothBlacklist::BluetoothBlacklist() {
PopulateWithDefaultValues();
+ PopulateWithServerProvidedValues();
}
void BluetoothBlacklist::PopulateWithDefaultValues() {
@@ -172,4 +175,8 @@ void BluetoothBlacklist::PopulateWithDefaultValues() {
Value::EXCLUDE_READS);
}
+void BluetoothBlacklist::PopulateWithServerProvidedValues() {
+ Add(GetContentClient()->browser()->GetWebBluetoothBlacklist());
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698