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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 13032003: Browser Plugin: <webview> should inherit partition attribute of opener on attachment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 years, 9 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: content/browser/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 6240790a233b25633524cf4de8fe6533390d4934..e94249dddbc81fd35655aa610d5553f761419a6f 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -752,11 +752,15 @@ void BrowserPluginGuest::Attach(
GetWebContents()->GetRenderViewHost())->Init();
}
- // Inform the embedder BrowserPlugin of the attached guest.
- if (!name_.empty()) {
- SendMessageToEmbedder(
- new BrowserPluginMsg_UpdatedName(instance_id_, name_));
- }
+ const GURL& site_url = GetWebContents()->GetSiteInstance()->GetSiteURL();
Charlie Reis 2013/04/04 21:30:23 nit: Move this declaration below the comment, and
+ // Inform the embedder of the guest's information.
+ BrowserPluginMsg_Attach_ACK_Params ack_params;
+ ack_params.storage_partition_id = site_url.query();
+ ack_params.persist_storage =
+ site_url.path().find("persist") != std::string::npos;
+ ack_params.name = name_;
+ SendMessageToEmbedder(
+ new BrowserPluginMsg_Attach_ACK(instance_id_, ack_params));
}
void BrowserPluginGuest::OnCompositorFrameACK(

Powered by Google App Engine
This is Rietveld 408576698