Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1770)

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 11866004: Add scheme to HostZoomMap (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add namespace Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
}
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698