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

@ -56,8 +56,10 @@ std::string RemoveWhitespace(const std::string& str) {
} // namespace
AtomBrowserContext::AtomBrowserContext()
: job_factory_(new AtomURLRequestJobFactory) {
AtomBrowserContext::AtomBrowserContext(const std::string& partition,
bool in_memory)
: brightray::BrowserContext(partition, in_memory),
job_factory_(new AtomURLRequestJobFactory) {
}
AtomBrowserContext::~AtomBrowserContext() {
@ -162,3 +164,13 @@ void AtomBrowserContext::RegisterPrefs(PrefRegistrySimple* pref_registry) {
}
} // namespace atom
namespace brightray {
// static
BrowserContext* BrowserContext::Create(const std::string& partition,
bool in_memory) {
return new atom::AtomBrowserContext(partition, in_memory);
}
} // namespace brightray