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 ad8c5297c972e163fda5e573a3de897c1684e7d1..cfa8445d6ee09045a4b7cc20d104e57db54637d8 100644 |
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc |
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc |
@@ -90,9 +90,7 @@ OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile) |
: profile_(real_profile), |
prefs_(PrefServiceSyncable::IncognitoFromProfile(real_profile)), |
io_data_(this), |
- start_time_(Time::Now()), |
- zoom_callback_(base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged, |
- base::Unretained(this))) { |
+ start_time_(Time::Now()) { |
// Register on BrowserContext. |
user_prefs::UserPrefs::Set(this, prefs_); |
} |
@@ -137,9 +135,6 @@ void OffTheRecordProfileImpl::Init() { |
OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { |
MaybeSendDestroyedNotification(); |
- HostZoomMap::GetForBrowserContext(profile_)->RemoveZoomLevelChangedCallback( |
- zoom_callback_); |
- |
#if defined(ENABLE_PLUGINS) |
ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext( |
io_data_.GetResourceContextNoInit()); |
@@ -170,7 +165,9 @@ 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. |
- parent_host_zoom_map->AddZoomLevelChangedCallback(zoom_callback_); |
+ zoom_subscription_ = parent_host_zoom_map->AddZoomLevelChangedCallback( |
+ base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged, |
+ base::Unretained(this))); |
} |
#if defined(OS_ANDROID) || defined(OS_IOS) |