| 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 489c2aec63836e5c08735aabc07ae084d1f52ff8..23f3ff04d37f05d731fbf6085a9f6d4e71db9c59 100644
|
| --- a/chrome/browser/profiles/off_the_record_profile_impl.cc
|
| +++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
|
| @@ -45,8 +45,6 @@
|
| #include "chrome/common/render_messages.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/host_zoom_map.h"
|
| -#include "content/public/browser/notification_service.h"
|
| -#include "content/public/browser/notification_types.h"
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/storage_partition.h"
|
| #include "content/public/browser/web_contents.h"
|
| @@ -165,8 +163,7 @@ void OffTheRecordProfileImpl::InitHostZoomMap() {
|
| host_zoom_map->CopyFrom(parent_host_zoom_map);
|
| // Observe parent's HZM change for propagating change of parent's
|
| // change to this HZM.
|
| - registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
|
| - content::Source<HostZoomMap>(parent_host_zoom_map));
|
| + Observe(parent_host_zoom_map);
|
| }
|
|
|
| #if defined(OS_ANDROID)
|
| @@ -428,21 +425,15 @@ GURL OffTheRecordProfileImpl::GetHomePage() {
|
| return profile_->GetHomePage();
|
| }
|
|
|
| -void OffTheRecordProfileImpl::Observe(
|
| - int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) {
|
| - if (type == content::NOTIFICATION_ZOOM_LEVEL_CHANGED) {
|
| - const std::string& host =
|
| - *(content::Details<const std::string>(details).ptr());
|
| - if (!host.empty()) {
|
| - 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);
|
| - }
|
| - }
|
| +void OffTheRecordProfileImpl::OnZoomLevelChanged(const std::string& host) {
|
| + if (host.empty())
|
| + return;
|
| +
|
| + 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);
|
| }
|
|
|
| #if defined(OS_CHROMEOS)
|
|
|