refactor: add ElectronBrowserContext::GetDefaultBrowserContext()
(#46086)
* 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> --------- 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
bc9389df9a
commit
7ea2daf456
8 changed files with 26 additions and 11 deletions
|
@ -544,8 +544,7 @@ void ElectronURLLoaderFactory::StartLoadingHttp(
|
|||
request->method != net::HttpRequestHeaders::kHeadMethod)
|
||||
dict.Get("uploadData", &upload_data);
|
||||
|
||||
ElectronBrowserContext* browser_context =
|
||||
ElectronBrowserContext::From("", false);
|
||||
auto* browser_context = ElectronBrowserContext::GetDefaultBrowserContext();
|
||||
v8::Local<v8::Value> value;
|
||||
if (dict.Get("session", &value)) {
|
||||
if (value->IsNull()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue