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 e2225bac044e306c1e8450572c8abddec57518b6..4891b18ee2dc70e67a5f7143c917bbc342a8d926 100644 |
| --- a/chrome/browser/ui/browser_commands.cc |
| +++ b/chrome/browser/ui/browser_commands.cc |
| @@ -1144,6 +1144,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 |
| + // page (which generated the block) instead. |
| + if (entry->GetURL() == GURL("data:,Blocked")) { |
|
sky
2014/06/01 19:55:11
Is "data:,Blocked" not a legal url that could be e
|
| + entry = contents->GetController().GetEntryAtOffset(-1); |
| + if (!entry) |
| + return; |
| + } |
| + |
| ViewSource(browser, contents, entry->GetURL(), entry->GetPageState()); |
| } |