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

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

Issue 11412279: Browser Plugin: Only update src attribute on top-level navigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated BrowserPluginTest.CustomEvents to cover this change Created 8 years, 1 month 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
« no previous file with comments | « no previous file | content/renderer/browser_plugin/browser_plugin_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e47fe771e47b77ae448495f0dc5a472c352d10f6..a2c0ed0a5ea10bd3e55e91d59f33a5780092191c 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -613,13 +613,14 @@ void BrowserPlugin::LoadCommit(
// If the guest has just committed a new navigation then it is no longer
// crashed.
guest_crashed_ = false;
- src_ = params.url.spec();
+ if (params.is_top_level)
+ src_ = params.url.spec();
process_id_ = params.process_id;
current_nav_entry_index_ = params.current_entry_index;
nav_entry_count_ = params.entry_count;
std::map<std::string, base::Value*> props;
- props[kURL] = base::Value::CreateStringValue(src_);
+ props[kURL] = base::Value::CreateStringValue(params.url.spec());
props[kIsTopLevel] = base::Value::CreateBooleanValue(params.is_top_level);
TriggerEvent(kEventLoadCommit, &props);
}
« no previous file with comments | « no previous file | content/renderer/browser_plugin/browser_plugin_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698