Add StoragePartition and extension object proxy support (issue #1973)

This commit is contained in:
Marshall Greenblatt
2016-08-24 12:28:52 +03:00
parent 1c06d8e3f5
commit 69334e22c2
19 changed files with 810 additions and 138 deletions

View File

@ -18,6 +18,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/chrome_url_request_util.h"
#include "chrome/browser/extensions/event_router_forwarder.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
@ -61,7 +62,10 @@ bool CefExtensionsBrowserClient::IsValidContext(BrowserContext* context) {
bool CefExtensionsBrowserClient::IsSameContext(BrowserContext* first,
BrowserContext* second) {
return first == second;
// Returns true if |first| and |second| share the same underlying
// CefBrowserContextImpl.
return CefBrowserContextImpl::GetForContext(first).get() ==
CefBrowserContextImpl::GetForContext(second).get();
}
bool CefExtensionsBrowserClient::HasOffTheRecordContext(
@ -77,7 +81,7 @@ BrowserContext* CefExtensionsBrowserClient::GetOffTheRecordContext(
BrowserContext* CefExtensionsBrowserClient::GetOriginalContext(
BrowserContext* context) {
return context;
return chrome::GetBrowserContextRedirectedInIncognito(context);
}
bool CefExtensionsBrowserClient::IsGuestSession(