fix: allow creating service for temporary partitions (nws13n) (#17930)

This commit is contained in:
Robo 2019-04-23 17:30:53 -07:00 committed by Cheng Zhao
parent 53c453567f
commit e1e055a837
2 changed files with 8 additions and 0 deletions

View file

@ -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

View file

@ -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