Index: chrome/browser/profiles/off_the_record_profile_impl_unittest.cc |
=================================================================== |
--- chrome/browser/profiles/off_the_record_profile_impl_unittest.cc (revision 122827) |
+++ chrome/browser/profiles/off_the_record_profile_impl_unittest.cc (working copy) |
@@ -24,20 +24,14 @@ |
class TestingProfileWithHostZoomMap : public TestingProfile, |
public content::NotificationObserver { |
public: |
- TestingProfileWithHostZoomMap() {} |
+ TestingProfileWithHostZoomMap() { |
+ HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this); |
+ registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED, |
+ content::Source<HostZoomMap>(host_zoom_map)); |
+ } |
virtual ~TestingProfileWithHostZoomMap() {} |
- virtual HostZoomMap* GetHostZoomMap() { |
- if (!host_zoom_map_) { |
- host_zoom_map_ = HostZoomMap::Create(); |
- |
- registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED, |
- content::Source<HostZoomMap>(host_zoom_map_)); |
- } |
- return host_zoom_map_.get(); |
- } |
- |
virtual Profile* GetOffTheRecordProfile() OVERRIDE { |
if (!off_the_record_profile_.get()) |
off_the_record_profile_.reset(CreateOffTheRecordProfile()); |
@@ -70,7 +64,6 @@ |
private: |
content::NotificationRegistrar registrar_; |
- scoped_refptr<HostZoomMap> host_zoom_map_; |
scoped_ptr<Profile> off_the_record_profile_; |
scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; |
@@ -133,7 +126,8 @@ |
ASSERT_TRUE(parent_profile->GetOffTheRecordPrefs()); |
// Prepare parent host zoom map. |
- HostZoomMap* parent_zoom_map = parent_profile->GetHostZoomMap(); |
+ HostZoomMap* parent_zoom_map = |
+ HostZoomMap::GetForBrowserContext(parent_profile); |
ASSERT_TRUE(parent_zoom_map); |
parent_zoom_map->SetZoomLevel(host, zoom_level_25); |
@@ -147,7 +141,8 @@ |
new OffTheRecordProfileImpl(parent_profile.get())); |
// Prepare child host zoom map. |
- HostZoomMap* child_zoom_map = child_profile->GetHostZoomMap(); |
+ HostZoomMap* child_zoom_map = |
+ HostZoomMap::GetForBrowserContext(child_profile); |
ASSERT_TRUE(child_zoom_map); |
// Verity. |