Chromium Code Reviews| Index: chrome/browser/ui/browser_commands.cc |
| diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc |
| index 37da6f327e5dbc11213e05c12733f9415a7b088f..51d6964fb875968b7e2a8dfcad6c89c4c409b0df 100644 |
| --- a/chrome/browser/ui/browser_commands.cc |
| +++ b/chrome/browser/ui/browser_commands.cc |
| @@ -1146,6 +1146,14 @@ void ViewSource(Browser* browser, WebContents* contents) { |
| if (!entry) |
| return; |
| + // If blink sent us to its blocked-page URL, show the source of the previous |
|
brettw
2014/06/18 21:51:41
Can this explain in more detail what happens when
Tom Sepez
2014/06/18 22:13:22
Done.
|
| + // page (which generated the block) instead. |
| + if (entry->GetURL() == GURL("data:,")) { |
| + NavigationEntry* previous = contents->GetController().GetEntryAtOffset(-1); |
| + if (previous && previous->GetXssDetected()) |
| + entry = previous; |
| + } |
| + |
| ViewSource(browser, contents, entry->GetURL(), entry->GetPageState()); |
| } |