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

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: Fix test that broken 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 2c8e825a915ed4c79c1fc845200f4d8d121818c1..eff78165f50dd7ae3cc2387847eaec73a087c242 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"
@@ -471,9 +472,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,
« no previous file with comments | « chrome/browser/extensions/extension_renderer_state.h ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698