| Index: chrome/browser/profiles/profile_impl.cc
|
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
| index 128197db8db8c7b47a53f5ba27c0ac0145a0aaf9..912a7aaa699ece57aecbf8a4c2d844287cdeac76 100644
|
| --- a/chrome/browser/profiles/profile_impl.cc
|
| +++ b/chrome/browser/profiles/profile_impl.cc
|
| @@ -585,7 +585,7 @@ void ProfileImpl::InitHostZoomMap() {
|
| bool success = host_zoom_dictionary->GetDoubleWithoutPathExpansion(
|
| host, &zoom_level);
|
| DCHECK(success);
|
| - host_zoom_map->SetZoomLevel(host, zoom_level);
|
| + host_zoom_map->SetZoomLevelForHost(host, zoom_level);
|
| }
|
| }
|
|
|
| @@ -981,18 +981,20 @@ void ProfileImpl::OnDefaultZoomLevelChanged() {
|
| pref_change_registrar_.prefs()->GetDouble(prefs::kDefaultZoomLevel));
|
| }
|
|
|
| -void ProfileImpl::OnZoomLevelChanged(const std::string& host) {
|
| - if (host.empty())
|
| +void ProfileImpl::OnZoomLevelChanged(
|
| + const HostZoomMap::ZoomLevelChange& change) {
|
| +
|
| + if (change.mode != HostZoomMap::ZOOM_CHANGED_FOR_HOST)
|
| return;
|
| HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this);
|
| - double level = host_zoom_map->GetZoomLevel(host);
|
| + double level = change.zoom_level;
|
| DictionaryPrefUpdate update(prefs_.get(), prefs::kPerHostZoomLevels);
|
| DictionaryValue* host_zoom_dictionary = update.Get();
|
| if (level == host_zoom_map->GetDefaultZoomLevel()) {
|
| - host_zoom_dictionary->RemoveWithoutPathExpansion(host, NULL);
|
| + host_zoom_dictionary->RemoveWithoutPathExpansion(change.host, NULL);
|
| } else {
|
| host_zoom_dictionary->SetWithoutPathExpansion(
|
| - host, Value::CreateDoubleValue(level));
|
| + change.host, Value::CreateDoubleValue(level));
|
| }
|
| }
|
|
|
|
|