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 50fb694637c18442d72ce12516f2ff581e83706d..3447c06cefb5ddf6372a767d2e2aade1968ae066 100644 |
--- a/chrome/browser/ui/zoom/zoom_controller.cc |
+++ b/chrome/browser/ui/zoom/zoom_controller.cc |
@@ -81,13 +81,10 @@ bool ZoomController::SetZoomLevelByExtension( |
const scoped_refptr<const extensions::Extension>& extension) { |
content::NavigationEntry* entry = |
web_contents()->GetController().GetLastCommittedEntry(); |
- bool is_normal_page = |
- entry && entry->GetPageType() == content::PAGE_TYPE_NORMAL; |
// Cannot zoom in disabled mode. Also, don't allow changing zoom level on |
// a crashed tab, an error page or an interstitial page. |
if (zoom_mode_ == ZOOM_MODE_DISABLED || |
- !web_contents()->GetRenderViewHost()->IsRenderViewLive() || |
- !is_normal_page) |
+ !web_contents()->GetRenderViewHost()->IsRenderViewLive()) |
return false; |
// Store extension data so that |extension| can be attributed when the zoom |
@@ -139,7 +136,8 @@ bool ZoomController::SetZoomLevelByExtension( |
last_extension_ = NULL; |
return false; |
} |
- std::string host = net::GetHostOrSpecFromURL(entry->GetURL()); |
+ std::string host = |
+ net::GetHostOrSpecFromURL(content::HostZoomMap::GetURLFromEntry(entry)); |
zoom_map->SetZoomLevelForHost(host, zoom_level); |
} |
@@ -172,7 +170,7 @@ void ZoomController::SetZoomMode(ZoomMode new_mode) { |
web_contents()->GetController().GetLastCommittedEntry(); |
if (entry) { |
- GURL url = entry->GetURL(); |
+ GURL url = content::HostZoomMap::GetURLFromEntry(entry); |
std::string host = net::GetHostOrSpecFromURL(url); |
if (zoom_map->HasZoomLevel(url.scheme(), host)) { |
@@ -269,7 +267,8 @@ void ZoomController::UpdateState(const std::string& host) { |
content::NavigationEntry* entry = |
web_contents()->GetController().GetLastCommittedEntry(); |
if (!entry || |
- host != net::GetHostOrSpecFromURL(entry->GetURL())) { |
+ host != net::GetHostOrSpecFromURL( |
+ content::HostZoomMap::GetURLFromEntry(entry))) { |
return; |
} |
} |