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..cdcc6a8c67251553da8d88c275922afadde3514e 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(); |
|
Avi (use Gerrit)
2013/01/07 19:36:11
GetContentsMimeType() already returns a std::strin
wolenetz
2013/01/08 19:17:34
Good point. I'll upload another PS with this fixe
|
| + bool is_viewable_mime_type = net::IsSupportedNonImageMimeType(mime_type) && |
| + !net::IsSupportedMediaMimeType(mime_type); |
| NavigationEntry* active_entry = GetActiveEntry(); |
| return active_entry && !active_entry->IsViewSourceMode() && |
| - is_supported_mime_type && !web_contents_->GetInterstitialPage(); |
| + is_viewable_mime_type && !web_contents_->GetInterstitialPage(); |
| } |
| int NavigationControllerImpl::GetLastCommittedEntryIndex() const { |