Move management of browser context to BrowserContext
This commit is contained in:
parent
ba25bed45b
commit
fafb28e41a
6 changed files with 22 additions and 38 deletions
|
@ -50,26 +50,11 @@ AtomBrowserMainParts* AtomBrowserMainParts::Get() {
|
|||
return self_;
|
||||
}
|
||||
|
||||
content::BrowserContext* AtomBrowserMainParts::GetBrowserContextForPartition(
|
||||
const std::string& partition, bool in_memory) {
|
||||
if (ContainsKey(browser_context_map_, partition))
|
||||
return browser_context_map_[partition].get();
|
||||
|
||||
brightray::BrowserContext* browser_context = CreateBrowserContext();
|
||||
browser_context->Initialize(partition, in_memory);
|
||||
browser_context_map_[partition] = make_scoped_refptr(browser_context);
|
||||
return browser_context;
|
||||
}
|
||||
|
||||
void AtomBrowserMainParts::RegisterDestructionCallback(
|
||||
const base::Closure& callback) {
|
||||
destruction_callbacks_.push_back(callback);
|
||||
}
|
||||
|
||||
brightray::BrowserContext* AtomBrowserMainParts::CreateBrowserContext() {
|
||||
return new AtomBrowserContext();
|
||||
}
|
||||
|
||||
void AtomBrowserMainParts::PostEarlyInitialization() {
|
||||
brightray::BrowserMainParts::PostEarlyInitialization();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue