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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 8956050: Rename TabContents::controller() to GetController and put it into the WebContents interface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
===================================================================
--- chrome/browser/safe_browsing/safe_browsing_blocking_page.cc (revision 115228)
+++ chrome/browser/safe_browsing/safe_browsing_blocking_page.cc (working copy)
@@ -146,7 +146,7 @@
RecordUserAction(SHOW);
if (!is_main_frame_load_blocked_) {
navigation_entry_index_to_remove_ =
- tab()->controller().last_committed_entry_index();
+ tab()->GetController().last_committed_entry_index();
} else {
navigation_entry_index_to_remove_ = -1;
}
@@ -467,13 +467,13 @@
// Otherwise the offending entry has committed, and we need to go back or
// to a safe page. We will close the interstitial when that page commits.
- if (tab()->controller().CanGoBack()) {
- tab()->controller().GoBack();
+ if (tab()->GetController().CanGoBack()) {
+ tab()->GetController().GoBack();
} else {
- tab()->controller().LoadURL(GURL(chrome::kChromeUINewTabURL),
- content::Referrer(),
- content::PAGE_TRANSITION_START_PAGE,
- std::string());
+ tab()->GetController().LoadURL(GURL(chrome::kChromeUINewTabURL),
+ content::Referrer(),
+ content::PAGE_TRANSITION_START_PAGE,
+ std::string());
}
return;
}
@@ -599,11 +599,13 @@
// for the tab has by then already been destroyed. We also don't delete the
// current entry if it has been committed again, which is possible on a page
// that had a subresource warning.
- int last_committed_index = tab()->controller().last_committed_entry_index();
+ int last_committed_index =
+ tab()->GetController().last_committed_entry_index();
if (navigation_entry_index_to_remove_ != -1 &&
navigation_entry_index_to_remove_ != last_committed_index &&
!tab()->is_being_destroyed()) {
- tab()->controller().RemoveEntryAtIndex(navigation_entry_index_to_remove_);
+ tab()->GetController().RemoveEntryAtIndex(
+ navigation_entry_index_to_remove_);
navigation_entry_index_to_remove_ = -1;
}
InterstitialPage::DontProceed();
« no previous file with comments | « chrome/browser/safe_browsing/malware_details.cc ('k') | chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698