refactor: prefer using base::NoDestructor
to base::{Singleton,LazyInstance}
(#41424)
refactor: prefer using base::NoDestructor to base::{Singleton,LazyInstance} Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
a55f23979e
commit
7331e5dfb1
12 changed files with 44 additions and 18 deletions
|
@ -5,9 +5,13 @@
|
|||
#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_FACTORY_H_
|
||||
#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_FACTORY_H_
|
||||
|
||||
#include "base/memory/singleton.h"
|
||||
#include "extensions/browser/extension_system_provider.h"
|
||||
|
||||
namespace base {
|
||||
template <typename T>
|
||||
class NoDestructor;
|
||||
} // namespace base
|
||||
|
||||
namespace extensions {
|
||||
|
||||
// A factory that provides ElectronExtensionSystem.
|
||||
|
@ -26,7 +30,7 @@ class ElectronExtensionSystemFactory : public ExtensionSystemProvider {
|
|||
const ElectronExtensionSystemFactory&) = delete;
|
||||
|
||||
private:
|
||||
friend struct base::DefaultSingletonTraits<ElectronExtensionSystemFactory>;
|
||||
friend base::NoDestructor<ElectronExtensionSystemFactory>;
|
||||
|
||||
ElectronExtensionSystemFactory();
|
||||
~ElectronExtensionSystemFactory() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue