refactor: add ElectronBrowserContext::GetDefaultBrowserContext()
(#46085)
* refactor: add ElectronBrowserContext::DestroyAllContexts()
Simpler semantics than previous implementation; also hides the
"default context must be destroyed last" implementation detail.
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: add ElectronBrowserContext::GetDefaultBrowserContext()
clearer semantics than everyone calling From("", false)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fixup! refactor: add ElectronBrowserContext::DestroyAllContexts()
fix: collision with 998de7a
---------
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:
parent
a3ba653bee
commit
c6c67208d2
7 changed files with 15 additions and 6 deletions
|
@ -882,6 +882,12 @@ ElectronBrowserContext* ElectronBrowserContext::From(
|
|||
return context.get();
|
||||
}
|
||||
|
||||
// static
|
||||
ElectronBrowserContext* ElectronBrowserContext::GetDefaultBrowserContext(
|
||||
base::Value::Dict options) {
|
||||
return ElectronBrowserContext::From("", false, std::move(options));
|
||||
}
|
||||
|
||||
ElectronBrowserContext* ElectronBrowserContext::FromPath(
|
||||
const base::FilePath& path,
|
||||
base::Value::Dict options) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue