Store BrowserContext in ref-counted ptr
This commit is contained in:
parent
58fb166b0b
commit
dc1e50c62e
3 changed files with 8 additions and 4 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "browser/permission_manager.h"
|
||||
#include "browser/url_request_context_getter.h"
|
||||
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
|
||||
class PrefRegistrySimple;
|
||||
|
@ -17,7 +18,8 @@ namespace brightray {
|
|||
|
||||
class PermissionManager;
|
||||
|
||||
class BrowserContext : public content::BrowserContext,
|
||||
class BrowserContext : public base::RefCounted<BrowserContext>,
|
||||
public content::BrowserContext,
|
||||
public brightray::URLRequestContextGetter::Delegate {
|
||||
public:
|
||||
BrowserContext();
|
||||
|
@ -66,6 +68,7 @@ class BrowserContext : public content::BrowserContext,
|
|||
base::FilePath GetPath() const override;
|
||||
|
||||
private:
|
||||
friend class base::RefCounted<BrowserContext>;
|
||||
class ResourceContext;
|
||||
|
||||
void RegisterInternalPrefs(PrefRegistrySimple* pref_registry);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue