From 67e79990f0ea1d003b0f46d9e2621658b20bae92 Mon Sep 17 00:00:00 2001 From: "erg@chromium.org" Date: Mon, 13 Feb 2012 20:47:58 +0000 Subject: Profiles: Generalize ProfileKeyedServiceFactory into a base class and the part that deals with memory storage. This patch rips apart the dependency tracking parts of ProfileKeyedServiceFactory into a base class. Derived classes from ProfileKeyedBaseFactory now exist to deal with memory management and lifecycle events. ProfileKeyedBase is the most generic thing that can be tracked (it is simply a virtual destructor). For example, I've created RefcountedKeyedServiceFactory, which derives from ProfileKeyedBaseFactory. Everything tracked via that Factory must be a RefcountedProfileKeyedService. The storage layer uses scoped_refptr<>s in a map instead of normal pointers. This patch converts CookieSettings over (I'm ignoring the rest that could be ported due to how large the patch would be). Other than some minor changes to the testing interface, this doesn't change ProfileKeyedServiceFactory usage. BUG=77155 R=mirandac, jochen, sky, jhawkins TBR=tim Review URL: http://codereview.chromium.org/9360008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121727 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/content_settings/content_setting_bubble_model.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'chrome/browser/ui/content_settings') diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc index fb07eb2..4a0a639 100644 --- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc +++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -261,7 +261,8 @@ class ContentSettingSingleRadioGroup radio_group.radio_items.push_back(radio_allow_label); radio_group.radio_items.push_back(radio_block_label); HostContentSettingsMap* map = profile()->GetHostContentSettingsMap(); - CookieSettings* cookie_settings = CookieSettings::GetForProfile(profile()); + CookieSettings* cookie_settings = + CookieSettings::Factory::GetForProfile(profile()); ContentSetting most_restrictive_setting; SettingSource most_restrictive_setting_source = SETTING_SOURCE_NONE; -- cgit v1.1