feat: just enough //extensions to load a simple devtools extension (#19515)

This commit is contained in:
Jeremy Apthorp 2020-01-14 16:20:30 -08:00 committed by GitHub
parent 9c1310dadc
commit 55368e4d97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 250 additions and 14 deletions

View file

@ -17,7 +17,9 @@
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#include "components/proxy_config/proxy_config_dictionary.h"
#include "components/proxy_config/proxy_config_pref_names.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/common/content_switches.h"
#include "extensions/common/constants.h"
#include "net/proxy_resolution/proxy_config.h"
#include "net/proxy_resolution/proxy_config_service.h"
#include "net/proxy_resolution/proxy_config_with_annotation.h"
@ -89,6 +91,10 @@ void BrowserProcessImpl::PostEarlyInitialization() {
}
void BrowserProcessImpl::PreCreateThreads() {
// chrome-extension:// URLs are safe to request anywhere, but may only
// commit (including in iframes) in extension processes.
content::ChildProcessSecurityPolicy::GetInstance()
->RegisterWebSafeIsolatedScheme(extensions::kExtensionScheme, true);
// Must be created before the IOThread.
// Once IOThread class is no longer needed,
// this can be created on first use.