mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: allow creating service for temporary partitions (nws13n) (#17930)
This commit is contained in:
@@ -31,4 +31,10 @@ KeyedService* NetworkContextServiceFactory::BuildServiceInstanceFor(
|
||||
return new NetworkContextService(static_cast<AtomBrowserContext*>(context));
|
||||
}
|
||||
|
||||
content::BrowserContext* NetworkContextServiceFactory::GetBrowserContextToUse(
|
||||
content::BrowserContext* context) const {
|
||||
// Create separate service for temporary sessions.
|
||||
return context;
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
||||
@@ -41,6 +41,8 @@ class NetworkContextServiceFactory : public BrowserContextKeyedServiceFactory {
|
||||
// BrowserContextKeyedServiceFactory implementation:
|
||||
KeyedService* BuildServiceInstanceFor(
|
||||
content::BrowserContext* context) const override;
|
||||
content::BrowserContext* GetBrowserContextToUse(
|
||||
content::BrowserContext* context) const override;
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
|
||||
Reference in New Issue
Block a user