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

Side by Side Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 877323009: Extracted media mime type checks from net/base/ into media/base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added #include media/base/mime_util.h into shell_main_delegate.cc Created 5 years, 10 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/child/DEPS » ('j') | media/base/mime_util.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/navigation_controller_impl.h" 5 #include "content/browser/frame_host/navigation_controller_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 } 481 }
482 482
483 NavigationEntryImpl* NavigationControllerImpl::GetLastCommittedEntry() const { 483 NavigationEntryImpl* NavigationControllerImpl::GetLastCommittedEntry() const {
484 if (last_committed_entry_index_ == -1) 484 if (last_committed_entry_index_ == -1)
485 return NULL; 485 return NULL;
486 return entries_[last_committed_entry_index_].get(); 486 return entries_[last_committed_entry_index_].get();
487 } 487 }
488 488
489 bool NavigationControllerImpl::CanViewSource() const { 489 bool NavigationControllerImpl::CanViewSource() const {
490 const std::string& mime_type = delegate_->GetContentsMimeType(); 490 const std::string& mime_type = delegate_->GetContentsMimeType();
491 bool is_viewable_mime_type = net::IsSupportedNonImageMimeType(mime_type) && 491 bool is_viewable_mime_type = net::IsSupportedNonImageMimeType(mime_type);
492 !net::IsSupportedMediaMimeType(mime_type);
Ryan Sleevi 2015/02/25 03:04:24 This change is clearly a change in behaviour and l
servolk 2015/02/25 23:39:31 You are talking about IsSupportedNonImageMimeType
Ryan Sleevi 2015/02/25 23:43:13 No. The very clear deletion of "IsSupportedMediaMi
493 NavigationEntry* visible_entry = GetVisibleEntry(); 492 NavigationEntry* visible_entry = GetVisibleEntry();
494 return visible_entry && !visible_entry->IsViewSourceMode() && 493 return visible_entry && !visible_entry->IsViewSourceMode() &&
495 is_viewable_mime_type && !delegate_->GetInterstitialPage(); 494 is_viewable_mime_type && !delegate_->GetInterstitialPage();
496 } 495 }
497 496
498 int NavigationControllerImpl::GetLastCommittedEntryIndex() const { 497 int NavigationControllerImpl::GetLastCommittedEntryIndex() const {
499 return last_committed_entry_index_; 498 return last_committed_entry_index_;
500 } 499 }
501 500
502 int NavigationControllerImpl::GetEntryCount() const { 501 int NavigationControllerImpl::GetEntryCount() const {
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 } 1813 }
1815 } 1814 }
1816 } 1815 }
1817 1816
1818 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 1817 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
1819 const base::Callback<base::Time()>& get_timestamp_callback) { 1818 const base::Callback<base::Time()>& get_timestamp_callback) {
1820 get_timestamp_callback_ = get_timestamp_callback; 1819 get_timestamp_callback_ = get_timestamp_callback;
1821 } 1820 }
1822 1821
1823 } // namespace content 1822 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/child/DEPS » ('j') | media/base/mime_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698