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

Side by Side Diff: chrome/browser/usb/usb_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 CHROME_BROWSER_USB_USB_BLOCKLIST_H_ 5 #ifndef CHROME_BROWSER_USB_USB_BLOCKLIST_H_
6 #define CHROME_BROWSER_USB_USB_BLOCKLIST_H_ 6 #define CHROME_BROWSER_USB_USB_BLOCKLIST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 bool IsExcluded(scoped_refptr<const device::UsbDevice>); 59 bool IsExcluded(scoped_refptr<const device::UsbDevice>);
60 60
61 // Size of the blocklist. 61 // Size of the blocklist.
62 size_t size() { return blocklisted_devices_.size(); } 62 size_t size() { return blocklisted_devices_.size(); }
63 63
64 // Reload the blocklist for testing purposes. 64 // Reload the blocklist for testing purposes.
65 void ResetToDefaultValuesForTest(); 65 void ResetToDefaultValuesForTest();
66 66
67 private: 67 private:
68 // friend LazyInstance to permit access to private constructor. 68 // friend LazyInstance to permit access to private constructor.
69 friend base::DefaultLazyInstanceTraits<UsbBlocklist>; 69 friend base::LazyInstanceTraitsBase<UsbBlocklist>;
70 70
71 UsbBlocklist(); 71 UsbBlocklist();
72 72
73 void PopulateWithDefaultValues(); 73 void PopulateWithDefaultValues();
74 74
75 // Populates the blocklist with values obtained dynamically from a server, 75 // Populates the blocklist with values obtained dynamically from a server,
76 // able to be updated without shipping new executable versions. 76 // able to be updated without shipping new executable versions.
77 void PopulateWithServerProvidedValues(); 77 void PopulateWithServerProvidedValues();
78 78
79 // Set of blocklist entries. 79 // Set of blocklist entries.
80 std::set<Entry> blocklisted_devices_; 80 std::set<Entry> blocklisted_devices_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(UsbBlocklist); 82 DISALLOW_COPY_AND_ASSIGN(UsbBlocklist);
83 }; 83 };
84 84
85 #endif // CHROME_BROWSER_USB_USB_BLOCKLIST_H_ 85 #endif // CHROME_BROWSER_USB_USB_BLOCKLIST_H_
OLDNEW
« no previous file with comments | « chrome/browser/update_client/chrome_update_query_params_delegate.cc ('k') | chrome/common/chrome_paths.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698