refactor: remove use of deprecated API BuildServiceInstanceFor()
(32-x-y) (#43780)
* refactor: remove use of deprecated API BuildServiceInstanceFor() (#43690) * refactor: update BadgeManagerFactory * refactor: update NetworkContextServiceFactory * refactor: update ElectronExtensionSystemFactory * refactor: update UsbChooserContextFactory * refactor: update UsbHidChooserContextFactory * refactor: update SerialChooserContextFactory * refactor: update FileSystemAccessPermissionContextFactory * empty commit
This commit is contained in:
parent
0f11dd958f
commit
bd9e00968b
14 changed files with 42 additions and 37 deletions
|
@ -28,9 +28,10 @@ NetworkContextServiceFactory::NetworkContextServiceFactory()
|
|||
|
||||
NetworkContextServiceFactory::~NetworkContextServiceFactory() = default;
|
||||
|
||||
KeyedService* NetworkContextServiceFactory::BuildServiceInstanceFor(
|
||||
std::unique_ptr<KeyedService>
|
||||
NetworkContextServiceFactory::BuildServiceInstanceForBrowserContext(
|
||||
content::BrowserContext* context) const {
|
||||
return new NetworkContextService(
|
||||
return std::make_unique<NetworkContextService>(
|
||||
static_cast<ElectronBrowserContext*>(context));
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
#ifndef ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_FACTORY_H_
|
||||
#define ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_FACTORY_H_
|
||||
|
||||
#include "base/memory/singleton.h"
|
||||
#include <memory>
|
||||
|
||||
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
|
||||
|
||||
class KeyedService;
|
||||
|
@ -44,7 +45,7 @@ class NetworkContextServiceFactory : public BrowserContextKeyedServiceFactory {
|
|||
~NetworkContextServiceFactory() override;
|
||||
|
||||
// BrowserContextKeyedServiceFactory implementation:
|
||||
KeyedService* BuildServiceInstanceFor(
|
||||
std::unique_ptr<KeyedService> BuildServiceInstanceForBrowserContext(
|
||||
content::BrowserContext* context) const override;
|
||||
content::BrowserContext* GetBrowserContextToUse(
|
||||
content::BrowserContext* context) const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue