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

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

Issue 23851016: Convert zoom callbacks to use CallbackRegistry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge Created 7 years, 3 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 9a62d382d7258874903c579fd165c4f30d7e1d9b..b4e994adb3a31c04952dcad77b6867d2867f16fc 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -373,9 +373,7 @@ ProfileImpl::ProfileImpl(
Delegate* delegate,
CreateMode create_mode,
base::SequencedTaskRunner* sequenced_task_runner)
- : zoom_callback_(base::Bind(&ProfileImpl::OnZoomLevelChanged,
- base::Unretained(this))),
- path_(path),
+ : path_(path),
pref_registry_(new user_prefs::PrefRegistrySyncable),
io_data_(this),
host_content_settings_map_(NULL),
@@ -631,7 +629,8 @@ void ProfileImpl::InitHostZoomMap() {
}
}
- host_zoom_map->AddZoomLevelChangedCallback(zoom_callback_);
+ zoom_subscription_ = host_zoom_map->AddZoomLevelChangedCallback(
+ base::Bind(&ProfileImpl::OnZoomLevelChanged, base::Unretained(this)));
}
base::FilePath ProfileImpl::last_selected_directory() {
@@ -645,9 +644,6 @@ void ProfileImpl::set_last_selected_directory(const base::FilePath& path) {
ProfileImpl::~ProfileImpl() {
MaybeSendDestroyedNotification();
- HostZoomMap::GetForBrowserContext(this)->RemoveZoomLevelChangedCallback(
- zoom_callback_);
-
bool prefs_loaded = prefs_->GetInitializationStatus() !=
PrefService::INITIALIZATION_STATUS_WAITING;
« 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