Remove Chromium patches that are no longer required (see issue #2622).

This commit is contained in:
Marshall Greenblatt
2019-03-23 20:39:54 -04:00
parent ea27dff338
commit 9b43d265c3
16 changed files with 106 additions and 1391 deletions

View File

@@ -316,11 +316,6 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::Create(
request_context_impl->GetBrowserContext();
DCHECK(browser_context);
// A StoragePartitionImplMap must already exist for the BrowserContext. See
// additional comments in CefBrowserContext::Initialize().
DCHECK(browser_context->GetUserData(
content::BrowserContext::GetStoragePartitionMapUserDataKey()));
if (!create_params.request_context) {
// Using the global request context.
create_params.request_context = request_context_impl.get();

View File

@@ -27,14 +27,11 @@ ChromeBrowserProcessStub::ChromeBrowserProcessStub()
: initialized_(false),
context_initialized_(false),
shutdown_(false),
locale_("en-US") {
chrome::SetBrowserContextIncognitoHelper(this);
}
locale_("en-US") {}
ChromeBrowserProcessStub::~ChromeBrowserProcessStub() {
DCHECK((!initialized_ && !context_initialized_) || shutdown_);
g_browser_process = NULL;
chrome::SetBrowserContextIncognitoHelper(nullptr);
}
void ChromeBrowserProcessStub::Initialize() {
@@ -385,15 +382,3 @@ ChromeBrowserProcessStub::pref_service_factory() const {
NOTREACHED();
return NULL;
}
content::BrowserContext*
ChromeBrowserProcessStub::GetBrowserContextRedirectedInIncognito(
content::BrowserContext* context) {
return CefBrowserContext::GetForContext(context);
}
content::BrowserContext*
ChromeBrowserProcessStub::GetBrowserContextOwnInstanceInIncognito(
content::BrowserContext* context) {
return GetBrowserContextRedirectedInIncognito(context);
}

View File

@@ -15,7 +15,6 @@
#include "base/compiler_specific.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/event_router_forwarder.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "media/media_buildflags.h"
class ChromeProfileManagerStub;
@@ -29,8 +28,7 @@ class BackgroundModeManager {
DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager);
};
class ChromeBrowserProcessStub : public BrowserProcess,
public chrome::BrowserContextIncognitoHelper {
class ChromeBrowserProcessStub : public BrowserProcess {
public:
ChromeBrowserProcessStub();
~ChromeBrowserProcessStub() override;
@@ -109,12 +107,6 @@ class ChromeBrowserProcessStub : public BrowserProcess,
override;
prefs::InProcessPrefServiceFactory* pref_service_factory() const override;
// BrowserContextIncognitoHelper implementation.
content::BrowserContext* GetBrowserContextRedirectedInIncognito(
content::BrowserContext* context) override;
content::BrowserContext* GetBrowserContextOwnInstanceInIncognito(
content::BrowserContext* context) override;
private:
bool initialized_;
bool context_initialized_;

View File

@@ -696,13 +696,6 @@ CefContentBrowserClient::GetExtraServiceManifests() {
return std::vector<service_manager::Manifest>{GetCefRendererManifest()};
}
bool CefContentBrowserClient::IsSameBrowserContext(
content::BrowserContext* context1,
content::BrowserContext* context2) {
return CefBrowserContext::GetForContext(context1) ==
CefBrowserContext::GetForContext(context2);
}
void CefContentBrowserClient::AppendExtraCommandLineSwitches(
base::CommandLine* command_line,
int child_process_id) {

View File

@@ -59,8 +59,6 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
base::Optional<service_manager::Manifest> GetServiceManifestOverlay(
base::StringPiece name) override;
std::vector<service_manager::Manifest> GetExtraServiceManifests() override;
bool IsSameBrowserContext(content::BrowserContext* context1,
content::BrowserContext* context2) override;
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
int child_process_id) override;
void AdjustUtilityServiceProcessCommandLine(

View File

@@ -65,14 +65,14 @@ bool CefExtensionsBrowserClient::AreExtensionsDisabled(
}
bool CefExtensionsBrowserClient::IsValidContext(BrowserContext* context) {
return CefBrowserContext::GetForContext(context) != NULL;
return GetOriginalContext(context) != NULL;
}
bool CefExtensionsBrowserClient::IsSameContext(BrowserContext* first,
BrowserContext* second) {
// Returns true if |first| and |second| share the same underlying
// CefBrowserContext.
return GetCefImplContext(first) == GetCefImplContext(second);
return GetOriginalContext(first) == GetOriginalContext(second);
}
bool CefExtensionsBrowserClient::HasOffTheRecordContext(
@@ -88,11 +88,6 @@ BrowserContext* CefExtensionsBrowserClient::GetOffTheRecordContext(
BrowserContext* CefExtensionsBrowserClient::GetOriginalContext(
BrowserContext* context) {
return GetCefImplContext(context);
}
BrowserContext* CefExtensionsBrowserClient::GetCefImplContext(
BrowserContext* context) {
return CefBrowserContext::GetForContext(context);
}

View File

@@ -36,8 +36,6 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
content::BrowserContext* context) override;
content::BrowserContext* GetOriginalContext(
content::BrowserContext* context) override;
content::BrowserContext* GetCefImplContext(
content::BrowserContext* context) override;
bool IsGuestSession(content::BrowserContext* context) const override;
bool IsExtensionIncognitoEnabled(
const std::string& extension_id,