refactor: remove use of deprecated API BuildServiceInstanceFor() (#43707)

* refactor: update BadgeManagerFactory

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: update NetworkContextServiceFactory

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: update ElectronExtensionSystemFactory

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: update UsbChooserContextFactory

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: update UsbHidChooserContextFactory

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: update SerialChooserContextFactory

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: update FileSystemAccessPermissionContextFactory

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* empty commit

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2024-09-13 15:26:10 -05:00 committed by GitHub
parent 7a04a77ed0
commit 748f293400
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 42 additions and 36 deletions

View file

@ -31,9 +31,10 @@ BadgeManagerFactory::BadgeManagerFactory()
BadgeManagerFactory::~BadgeManagerFactory() = default;
KeyedService* BadgeManagerFactory::BuildServiceInstanceFor(
std::unique_ptr<KeyedService>
BadgeManagerFactory::BuildServiceInstanceForBrowserContext(
content::BrowserContext* context) const {
return new BadgeManager();
return std::make_unique<BadgeManager>();
}
} // namespace badging

View file

@ -36,7 +36,7 @@ class BadgeManagerFactory : public BrowserContextKeyedServiceFactory {
~BadgeManagerFactory() override;
// BrowserContextKeyedServiceFactory
KeyedService* BuildServiceInstanceFor(
std::unique_ptr<KeyedService> BuildServiceInstanceForBrowserContext(
content::BrowserContext* context) const override;
};