fix: allow creating service for temporary partitions (nws13n) (#17930)
This commit is contained in:
parent
53c453567f
commit
e1e055a837
2 changed files with 8 additions and 0 deletions
|
@ -31,4 +31,10 @@ KeyedService* NetworkContextServiceFactory::BuildServiceInstanceFor(
|
||||||
return new NetworkContextService(static_cast<AtomBrowserContext*>(context));
|
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
|
} // namespace atom
|
||||||
|
|
|
@ -41,6 +41,8 @@ class NetworkContextServiceFactory : public BrowserContextKeyedServiceFactory {
|
||||||
// BrowserContextKeyedServiceFactory implementation:
|
// BrowserContextKeyedServiceFactory implementation:
|
||||||
KeyedService* BuildServiceInstanceFor(
|
KeyedService* BuildServiceInstanceFor(
|
||||||
content::BrowserContext* context) const override;
|
content::BrowserContext* context) const override;
|
||||||
|
content::BrowserContext* GetBrowserContextToUse(
|
||||||
|
content::BrowserContext* context) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace atom
|
} // namespace atom
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue