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

Unified Diff: chrome/browser/ui/zoom/zoom_controller.cc

Issue 66993003: Most references to GetActiveEntry removed from chrome/browser/ui. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on ToT Created 7 years, 1 month 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/ui/zoom/zoom_controller.cc
diff --git a/chrome/browser/ui/zoom/zoom_controller.cc b/chrome/browser/ui/zoom/zoom_controller.cc
index 9c97feaa88f28ca3697d46b00d66e9519864a3ef..64ac8efe22d39da6163d5c3e0312324aee2562f3 100644
--- a/chrome/browser/ui/zoom/zoom_controller.cc
+++ b/chrome/browser/ui/zoom/zoom_controller.cc
@@ -71,12 +71,12 @@ void ZoomController::OnZoomLevelChanged(
void ZoomController::UpdateState(const std::string& host) {
// If |host| is empty, all observers should be updated.
if (!host.empty()) {
- // Use the active navigation entry's URL instead of the WebContents' so
- // virtual URLs work (e.g. chrome://settings). http://crbug.com/153950
- content::NavigationEntry* active_entry =
- web_contents()->GetController().GetActiveEntry();
- if (!active_entry ||
- host != net::GetHostOrSpecFromURL(active_entry->GetURL())) {
+ // Use the navigation entry's URL instead of the WebContents' so virtual
+ // URLs work (e.g. chrome://settings). http://crbug.com/153950
+ content::NavigationEntry* entry =
+ web_contents()->GetController().GetLastCommittedEntry();
+ if (!entry ||
+ host != net::GetHostOrSpecFromURL(entry->GetURL())) {
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698