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

Unified Diff: chrome/browser/guestview/webview/webview_guest.cc

Issue 22793018: <webview>: Implement support for package-local chrome-extension:// URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test to verify that a privileged partition can access a local resource Created 7 years, 3 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/guestview/webview/webview_guest.cc
diff --git a/chrome/browser/guestview/webview/webview_guest.cc b/chrome/browser/guestview/webview/webview_guest.cc
index e0ee6a0debee88d014fa86d30b832244d6e0d93b..0ca375672dabc899cc67e3150a079be9755a1391 100644
--- a/chrome/browser/guestview/webview/webview_guest.cc
+++ b/chrome/browser/guestview/webview/webview_guest.cc
@@ -19,6 +19,7 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/resource_request_details.h"
+#include "content/public/browser/site_instance.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
@@ -452,9 +453,13 @@ void WebViewGuest::LoadRedirect(const GURL& old_url,
}
void WebViewGuest::AddWebViewToExtensionRendererState() {
+ const GURL& site_url = web_contents()->GetSiteInstance()->GetSiteURL();
ExtensionRendererState::WebViewInfo webview_info;
webview_info.embedder_process_id = embedder_render_process_id();
webview_info.instance_id = view_instance_id();
+ // TODO(fsamuel): Partition IDs should probably be a chrome-only concept. They
+ // should probably be passed in via attach args.
+ webview_info.partition_id = site_url.query();
content::BrowserThread::PostTask(
content::BrowserThread::IO, FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698