| Index: chrome/browser/profiles/profile_impl.cc
|
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
| index 2b1020dc73f7322b079fb6a355b3909dc8ca2441..e5b51044e0b8737db1a31a1ada5841df6933830c 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);
|
| }
|
| }
|
|
|
| @@ -957,18 +957,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));
|
| }
|
| }
|
|
|
|
|