Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1817)

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2182633007: Avoid using ContentBrowserClient::IsIllegalOrigin in ResourceDispatcherHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile failures Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index a8b4b5d0fe2802576945f1909bd4f52718e6c375..f28c62cee74fbc16e5030bf10d21bf8c3d30ee79 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -153,6 +153,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_context.h"
+#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/vpn_service_proxy.h"
@@ -2294,6 +2295,11 @@ bool ChromeContentBrowserClient::CanCreateWindow(
void ChromeContentBrowserClient::ResourceDispatcherHostCreated() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
+#if defined(ENABLE_EXTENSIONS)
+ DCHECK(content::ResourceDispatcherHost::Get());
jam 2016/08/01 20:06:01 nit: not needed by definition. if somehow someone
ananta 2016/08/02 00:40:49 Done.
+ content::ResourceDispatcherHost::Get()->AddSchemeForAccessCheck(
+ extensions::kExtensionScheme);
jam 2016/08/01 20:06:01 The rest of the RDH initialization on the chrome s
ananta 2016/08/02 00:40:49 Done.
+#endif
return g_browser_process->ResourceDispatcherHostCreated();
}

Powered by Google App Engine
This is Rietveld 408576698