Initialize the fake BrowserProcess object.
This commit is contained in:
parent
d934526bb3
commit
8dcb3726f9
2 changed files with 8 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include "atom/browser/net/atom_url_request_job_factory.h"
|
#include "atom/browser/net/atom_url_request_job_factory.h"
|
||||||
#include "base/threading/sequenced_worker_pool.h"
|
#include "base/threading/sequenced_worker_pool.h"
|
||||||
#include "base/threading/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/browser/browser_thread.h"
|
||||||
#include "content/public/common/url_constants.h"
|
#include "content/public/common/url_constants.h"
|
||||||
#include "net/url_request/data_protocol_handler.h"
|
#include "net/url_request/data_protocol_handler.h"
|
||||||
|
@ -19,7 +20,8 @@ using content::BrowserThread;
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
AtomBrowserContext::AtomBrowserContext()
|
AtomBrowserContext::AtomBrowserContext()
|
||||||
: job_factory_(new AtomURLRequestJobFactory) {
|
: fake_browser_process_(new BrowserProcess),
|
||||||
|
job_factory_(new AtomURLRequestJobFactory) {
|
||||||
}
|
}
|
||||||
|
|
||||||
AtomBrowserContext::~AtomBrowserContext() {
|
AtomBrowserContext::~AtomBrowserContext() {
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
#include "brightray/browser/browser_context.h"
|
#include "brightray/browser/browser_context.h"
|
||||||
|
|
||||||
|
class BrowserProcess;
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
class AtomURLRequestJobFactory;
|
class AtomURLRequestJobFactory;
|
||||||
|
@ -28,6 +30,9 @@ class AtomBrowserContext : public brightray::BrowserContext {
|
||||||
content::ProtocolHandlerScopedVector* interceptors) OVERRIDE;
|
content::ProtocolHandlerScopedVector* interceptors) OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
// A fake BrowserProcess object that used to feed the source code from chrome.
|
||||||
|
scoped_ptr<BrowserProcess> fake_browser_process_;
|
||||||
|
|
||||||
AtomURLRequestJobFactory* job_factory_; // Weak reference.
|
AtomURLRequestJobFactory* job_factory_; // Weak reference.
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(AtomBrowserContext);
|
DISALLOW_COPY_AND_ASSIGN(AtomBrowserContext);
|
||||||
|
|
Loading…
Reference in a new issue