From: Cheng Zhao Date: Thu, 21 Aug 2014 07:45:34 +0000 (+0800) Subject: Initialize the fake BrowserProcess object. X-Git-Tag: v0.16.0~20^2~16 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=8dcb3726f97ada070735a960b6416297f465d195;p=electron.git Initialize the fake BrowserProcess object. --- diff --git a/atom/browser/atom_browser_context.cc b/atom/browser/atom_browser_context.cc index 888f7f35..bcd10ed6 100644 --- a/atom/browser/atom_browser_context.cc +++ b/atom/browser/atom_browser_context.cc @@ -8,6 +8,7 @@ #include "atom/browser/net/atom_url_request_job_factory.h" #include "base/threading/sequenced_worker_pool.h" #include "base/threading/worker_pool.h" +#include "chrome/browser/browser_process.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/url_constants.h" #include "net/url_request/data_protocol_handler.h" @@ -19,7 +20,8 @@ using content::BrowserThread; namespace atom { AtomBrowserContext::AtomBrowserContext() - : job_factory_(new AtomURLRequestJobFactory) { + : fake_browser_process_(new BrowserProcess), + job_factory_(new AtomURLRequestJobFactory) { } AtomBrowserContext::~AtomBrowserContext() { diff --git a/atom/browser/atom_browser_context.h b/atom/browser/atom_browser_context.h index b3aab436..06860937 100644 --- a/atom/browser/atom_browser_context.h +++ b/atom/browser/atom_browser_context.h @@ -7,6 +7,8 @@ #include "brightray/browser/browser_context.h" +class BrowserProcess; + namespace atom { class AtomURLRequestJobFactory; @@ -28,6 +30,9 @@ class AtomBrowserContext : public brightray::BrowserContext { content::ProtocolHandlerScopedVector* interceptors) OVERRIDE; private: + // A fake BrowserProcess object that used to feed the source code from chrome. + scoped_ptr fake_browser_process_; + AtomURLRequestJobFactory* job_factory_; // Weak reference. DISALLOW_COPY_AND_ASSIGN(AtomBrowserContext);