Move management of browser context to BrowserContext

This commit is contained in:
Cheng Zhao 2015-09-05 20:54:36 +08:00
parent ba25bed45b
commit fafb28e41a
6 changed files with 22 additions and 38 deletions

View file

@ -170,10 +170,8 @@ WebContents::WebContents(v8::Isolate* isolate,
bool in_memory = false;
options.Get("partition", &partition);
options.Get("inMemory", &in_memory);
if (!partition.empty()) {
browser_context = AtomBrowserMainParts::Get()
->GetBrowserContextForPartition(partition, in_memory);
}
if (!partition.empty())
browser_context = brightray::BrowserContext::From(partition, in_memory);
content::SiteInstance* site_instance = content::SiteInstance::CreateForURL(
browser_context, GURL("chrome-guest://fake-host"));
content::WebContents::CreateParams params(browser_context, site_instance);