commit | 0eb80d65c78ab3eb8ec47fee3007ae3386831b27 | [log] [tgz] |
---|---|---|
author | Mikel Astiz <[email protected]> | Tue May 30 19:44:41 2023 |
committer | Chromium LUCI CQ <[email protected]> | Tue May 30 19:44:41 2023 |
tree | 413a3aca8679cc3bfbd99b4b2805b76a8ce093fa | |
parent | 67c884421b28ead933798da5c6abc23792ea1434 [diff] [blame] |
Adopt base::NoDestructor for KeyedService factories For changes under /chrome/browser/usb It replaces base::Singleton, following the latest recommendation in base/ and browser_context_keyed_service_factory.h. For factories with a trivial destructor, it makes no difference. LSC doc: https://docs.google.com/document/d/1x1LqRQyfBOmpMkNQBYs7QBPSxLtuiImvmgcJYI_kaS4/edit?usp=sharing This CL was uploaded by git cl split. [email protected] Bug: 925323 Change-Id: I720ace9ba155313dee86bdf9a81cee81b964e950 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4573568 Reviewed-by: Matt Reynolds <[email protected]> Auto-Submit: Mikel Astiz <[email protected]> Commit-Queue: Matt Reynolds <[email protected]> Cr-Commit-Position: refs/heads/main@{#1150775}
diff --git a/chrome/browser/usb/usb_chooser_context_factory.h b/chrome/browser/usb/usb_chooser_context_factory.h index 11cf89a..31dad47 100644 --- a/chrome/browser/usb/usb_chooser_context_factory.h +++ b/chrome/browser/usb/usb_chooser_context_factory.h
@@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_USB_USB_CHOOSER_CONTEXT_FACTORY_H_ #define CHROME_BROWSER_USB_USB_CHOOSER_CONTEXT_FACTORY_H_ -#include "base/memory/singleton.h" +#include "base/no_destructor.h" #include "chrome/browser/profiles/profile_keyed_service_factory.h" class UsbChooserContext; @@ -21,7 +21,7 @@ UsbChooserContextFactory& operator=(const UsbChooserContextFactory&) = delete; private: - friend struct base::DefaultSingletonTraits<UsbChooserContextFactory>; + friend base::NoDestructor<UsbChooserContextFactory>; UsbChooserContextFactory(); ~UsbChooserContextFactory() override;