diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-13 20:47:58 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-13 20:47:58 +0000 |
commit | 67e79990f0ea1d003b0f46d9e2621658b20bae92 (patch) | |
tree | 05610f1533e900e7df9db6eb81a7b9c819262f46 /chrome/browser/spellchecker | |
parent | 78f000819426067d2c36529fde366174e3fd2e65 (diff) | |
download | chromium_src-67e79990f0ea1d003b0f46d9e2621658b20bae92.zip chromium_src-67e79990f0ea1d003b0f46d9e2621658b20bae92.tar.gz chromium_src-67e79990f0ea1d003b0f46d9e2621658b20bae92.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/spellchecker')
-rw-r--r-- | chrome/browser/spellchecker/spellcheck_profile_unittest.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/spellchecker/spellcheck_profile_unittest.cc b/chrome/browser/spellchecker/spellcheck_profile_unittest.cc index e44d7cd..bf4e9b5 100644 --- a/chrome/browser/spellchecker/spellcheck_profile_unittest.cc +++ b/chrome/browser/spellchecker/spellcheck_profile_unittest.cc @@ -65,7 +65,7 @@ class TestingSpellCheckProfile : public SpellCheckProfile { scoped_ptr<SpellCheckHost> returning_from_create_; }; -ProfileKeyedService* BuildTestingSpellCheckProfile(Profile* profile) { +ProfileKeyedBase* BuildTestingSpellCheckProfile(Profile* profile) { return new TestingSpellCheckProfile(profile); } |