Chromium Code Reviews| 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 d0363a7ae76a9d5fc1486e19e04a1823eeb947ca..21957eb4e0750ccfe09b7a6538d09ff7ef99b58b 100644 |
| --- a/chrome/browser/ui/zoom/zoom_controller.cc |
| +++ b/chrome/browser/ui/zoom/zoom_controller.cc |
| @@ -76,18 +76,18 @@ void ZoomController::OnPreferenceChanged(PrefServiceBase* service, |
| } |
| void ZoomController::UpdateState(const std::string& host) { |
| - if (host.empty()) |
| - return; |
| - |
| CHECK(web_contents()); // http://crbug.com/144879 |
| - // 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())) { |
| - return; |
| + // If |host| is empty, all observers should be updated. |
| + if (!host.empty()) { |
|
Dan Beam
2012/11/16 04:17:48
I included this diff (from: https://codereview.chr
|
| + // 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())) { |
| + return; |
| + } |
| } |
| bool dummy; |