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

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 2501083004: Fix View Frame Source for iframe of a file:// URL shows main frame's filename (Closed)
Patch Set: Adding a browsertest Created 4 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
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index e0269a8b693726b4c3e80e3dfd607876ad2fd6fd..c31dd6728eaf17d642d53f9a478a793e135c6b31 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -1234,6 +1234,7 @@ void ViewSource(Browser* browser,
GURL view_source_url =
GURL(content::kViewSourceScheme + std::string(":") + url.spec());
last_committed_entry->SetVirtualURL(view_source_url);
+ last_committed_entry->SetURL(GURL());
Charlie Reis 2016/11/23 23:52:20 Maybe it would make more sense to set this to |url
afakhry 2016/11/24 01:21:09 Thanks for the suggestion! It works. Done.
// Do not restore scroller position.
last_committed_entry->SetPageState(page_state.RemoveScrollOffset());

Powered by Google App Engine
This is Rietveld 408576698