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

Unified Diff: chrome/browser/profiles/off_the_record_profile_impl_unittest.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/off_the_record_profile_impl.cc ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/off_the_record_profile_impl_unittest.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_impl_unittest.cc b/chrome/browser/profiles/off_the_record_profile_impl_unittest.cc
index 09b6015c62c02036d60f3ad38cd8c22fbd69fe30..1b40fcf58638ff93f74f889ec4ed9498fc6c660f 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl_unittest.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl_unittest.cc
@@ -26,18 +26,14 @@ namespace {
class TestingProfileWithHostZoomMap : public TestingProfile {
public:
- TestingProfileWithHostZoomMap()
- : zoom_callback_(
- base::Bind(&TestingProfileWithHostZoomMap::OnZoomLevelChanged,
- base::Unretained(this))) {
- HostZoomMap::GetForBrowserContext(this)->AddZoomLevelChangedCallback(
- zoom_callback_);
+ TestingProfileWithHostZoomMap() {
+ zoom_subscription_ =
+ HostZoomMap::GetForBrowserContext(this)->AddZoomLevelChangedCallback(
+ base::Bind(&TestingProfileWithHostZoomMap::OnZoomLevelChanged,
+ base::Unretained(this)));
}
- virtual ~TestingProfileWithHostZoomMap() {
- HostZoomMap::GetForBrowserContext(this)->RemoveZoomLevelChangedCallback(
- zoom_callback_);
- }
+ virtual ~TestingProfileWithHostZoomMap() {}
virtual Profile* GetOffTheRecordProfile() OVERRIDE {
if (!off_the_record_profile_)
@@ -71,7 +67,7 @@ class TestingProfileWithHostZoomMap : public TestingProfile {
scoped_ptr<Profile> off_the_record_profile_;
scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_;
- HostZoomMap::ZoomLevelChangedCallback zoom_callback_;
+ scoped_ptr<HostZoomMap::Subscription> zoom_subscription_;
DISALLOW_COPY_AND_ASSIGN(TestingProfileWithHostZoomMap);
};
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.cc ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698