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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 10978028: Propagate storage partition id and persistence to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 1a81d23744cf750f0956a5aa3a9c32d961714010..572dd25a9f790d667edbf5747a1f2b5db7186f5b 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -98,7 +98,21 @@ std::string BrowserPlugin::GetSrcAttribute() const {
void BrowserPlugin::SetSrcAttribute(const std::string& src) {
if (src == src_ && !guest_crashed_)
return;
- if (!src.empty() || navigate_src_sent_) {
+
+ // If we haven't created the guest yet, do so now, if |src| is not empty and
+ // we will navigate it right after creation. If |src| is empty, we can delay
+ // the creation until we acutally need it.
+ if (!navigate_src_sent_ && !src.empty()) {
Fady Samuel 2012/09/25 19:22:40 You might need to update: content/renderer/browse
nasko 2012/09/25 22:57:22 Done.
+ BrowserPluginManager::Get()->Send(
+ new BrowserPluginHostMsg_CreateGuest(
+ render_view_->GetRoutingID(),
+ instance_id_,
+ parent_frame_,
+ storage_partition_id_,
+ persist_storage_));
+ }
+
+ if (navigate_src_sent_ || !src.empty()) {
BrowserPluginManager::Get()->Send(
new BrowserPluginHostMsg_NavigateGuest(
render_view_->GetRoutingID(),

Powered by Google App Engine
This is Rietveld 408576698