Chromium Code Reviews| Index: content/browser/web_contents/navigation_controller_impl.cc |
| diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc |
| index bd6971646b8d428103ed5fcb13eb1b9d226ebf1e..3da41144905a0d960b32d172d95987a112c567ff 100644 |
| --- a/content/browser/web_contents/navigation_controller_impl.cc |
| +++ b/content/browser/web_contents/navigation_controller_impl.cc |
| @@ -442,11 +442,12 @@ NavigationEntry* NavigationControllerImpl::GetLastCommittedEntry() const { |
| } |
| bool NavigationControllerImpl::CanViewSource() const { |
| - bool is_supported_mime_type = net::IsSupportedNonImageMimeType( |
| - web_contents_->GetContentsMimeType().c_str()); |
| + const std::string& mime_type = web_contents_->GetContentsMimeType().c_str(); |
| + bool is_viewable_mime_type = net::IsSupportedNonImageMimeType(mime_type) && |
| + !net::IsSupportedMediaMimeType(mime_type); |
|
scherkus (not reviewing)
2013/01/07 17:07:44
as a general FYI the one thing to sanity check her
wolenetz
2013/01/07 19:28:26
Scherkus & I synced offline, and agree that risk o
|
| NavigationEntry* active_entry = GetActiveEntry(); |
| return active_entry && !active_entry->IsViewSourceMode() && |
| - is_supported_mime_type && !web_contents_->GetInterstitialPage(); |
| + is_viewable_mime_type && !web_contents_->GetInterstitialPage(); |
|
scherkus (not reviewing)
2013/01/07 17:07:44
nit: this should have been a 4 space indent
wolenetz
2013/01/07 19:28:26
Thanks. Fixed, I will upload another PS.
|
| } |
| int NavigationControllerImpl::GetLastCommittedEntryIndex() const { |