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

Unified Diff: chrome/browser/profiles/off_the_record_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
Index: chrome/browser/profiles/off_the_record_profile_impl.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 7ff079cc46e654342532acb46076fea193a9f387..64b2848617405652d26412303f2f5497b47e7082 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -472,13 +472,19 @@ Profile* Profile::CreateOffTheRecordProfile() {
return profile;
}
-void OffTheRecordProfileImpl::OnZoomLevelChanged(const std::string& host) {
- if (host.empty())
- return;
-
+void OffTheRecordProfileImpl::OnZoomLevelChanged(
+ const HostZoomMap::ZoomLevelChange& change) {
HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this);
- HostZoomMap* parent_host_zoom_map =
- HostZoomMap::GetForBrowserContext(profile_);
- double level = parent_host_zoom_map->GetZoomLevel(host);
- host_zoom_map->SetZoomLevel(host, level);
+ switch (change.mode) {
+ case HostZoomMap::ZOOM_CHANGED_TEMPORARY_ZOOM:
+ return;
+ case HostZoomMap::ZOOM_CHANGED_FOR_HOST:
+ host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level);
+ return;
+ case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST:
+ host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme,
+ change.host,
+ change.zoom_level);
+ return;
+ }
}
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.h ('k') | chrome/browser/profiles/off_the_record_profile_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698