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

Side by Side Diff: content/browser/bluetooth/bluetooth_blocklist.h

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 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 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_BLOCKLIST_H_ 5 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_BLOCKLIST_H_
6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_BLOCKLIST_H_ 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_BLOCKLIST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void RemoveExcludedUUIDs( 78 void RemoveExcludedUUIDs(
79 blink::mojom::WebBluetoothRequestDeviceOptions* options); 79 blink::mojom::WebBluetoothRequestDeviceOptions* options);
80 80
81 // Size of blocklist. 81 // Size of blocklist.
82 size_t size() { return blocklisted_uuids_.size(); } 82 size_t size() { return blocklisted_uuids_.size(); }
83 83
84 void ResetToDefaultValuesForTest(); 84 void ResetToDefaultValuesForTest();
85 85
86 private: 86 private:
87 // friend LazyInstance to permit access to private constructor. 87 // friend LazyInstance to permit access to private constructor.
88 friend base::DefaultLazyInstanceTraits<BluetoothBlocklist>; 88 friend base::LazyInstanceTraitsBase<BluetoothBlocklist>;
89 89
90 BluetoothBlocklist(); 90 BluetoothBlocklist();
91 91
92 void PopulateWithDefaultValues(); 92 void PopulateWithDefaultValues();
93 93
94 // Populates blocklist with values obtained dynamically from a server, able 94 // Populates blocklist with values obtained dynamically from a server, able
95 // to be updated without shipping new executable versions. 95 // to be updated without shipping new executable versions.
96 void PopulateWithServerProvidedValues(); 96 void PopulateWithServerProvidedValues();
97 97
98 // Map of UUID to blocklisted value. 98 // Map of UUID to blocklisted value.
99 std::map<device::BluetoothUUID, Value> blocklisted_uuids_; 99 std::map<device::BluetoothUUID, Value> blocklisted_uuids_;
100 100
101 DISALLOW_COPY_AND_ASSIGN(BluetoothBlocklist); 101 DISALLOW_COPY_AND_ASSIGN(BluetoothBlocklist);
102 }; 102 };
103 103
104 } // namespace content 104 } // namespace content
105 105
106 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_BLOCKLIST_H_ 106 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_BLOCKLIST_H_
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_navigation_handle_core.cc ('k') | content/browser/browser_child_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698