| Index: chrome/browser/host_zoom_map.cc
|
| diff --git a/chrome/browser/host_zoom_map.cc b/chrome/browser/host_zoom_map.cc
|
| index f83d6f63993da3c6e35a4fee8de80efc2c8a345c..c646b0db967fd618f56b1e47e7ef6d71e9f8fecd 100644
|
| --- a/chrome/browser/host_zoom_map.cc
|
| +++ b/chrome/browser/host_zoom_map.cc
|
| @@ -13,6 +13,8 @@
|
| #include "chrome/common/notification_source.h"
|
| #include "chrome/common/notification_type.h"
|
| #include "chrome/common/pref_names.h"
|
| +#include "googleurl/src/gurl.h"
|
| +#include "net/base/net_util.h"
|
|
|
| HostZoomMap::HostZoomMap(Profile* profile)
|
| : profile_(profile),
|
| @@ -50,19 +52,19 @@ void HostZoomMap::RegisterUserPrefs(PrefService* prefs) {
|
| prefs->RegisterDictionaryPref(prefs::kPerHostZoomLevels);
|
| }
|
|
|
| -int HostZoomMap::GetZoomLevel(const std::string& host) const {
|
| +int HostZoomMap::GetZoomLevel(const GURL& url) const {
|
| + std::string host(net::GetHostOrSpecFromURL(url));
|
| AutoLock auto_lock(lock_);
|
| HostZoomLevels::const_iterator i(host_zoom_levels_.find(host));
|
| return (i == host_zoom_levels_.end()) ? 0 : i->second;
|
| }
|
|
|
| -void HostZoomMap::SetZoomLevel(const std::string& host, int level) {
|
| +void HostZoomMap::SetZoomLevel(const GURL& url, int level) {
|
| DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
|
| if (!profile_)
|
| return;
|
|
|
| - if (host.empty())
|
| - return;
|
| + std::string host(net::GetHostOrSpecFromURL(url));
|
|
|
| {
|
| AutoLock auto_lock(lock_);
|
|
|