diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-07 21:26:47 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-07 21:26:47 +0000 |
commit | 9b85081afdc2fbe9a5c309b982458748eb33267c (patch) | |
tree | 5d284fb701756ad640e40bb7ff7f74386cd67a23 /base/global_descriptors_posix.cc | |
parent | f90b60bc3a80bbe2b1c4b19931a309eb017c9bb1 (diff) | |
download | chromium_src-9b85081afdc2fbe9a5c309b982458748eb33267c.zip chromium_src-9b85081afdc2fbe9a5c309b982458748eb33267c.tar.gz chromium_src-9b85081afdc2fbe9a5c309b982458748eb33267c.tar.bz2 |
Wrap GlobalDescriptors singleton in accessor method.
When I switched GlobalDescriptors to using LeakySingletonTraits
in r67627, it didn't occur to me I had to fix all users of it.
TEST=compiles
Review URL: http://codereview.chromium.org/5517006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68518 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/global_descriptors_posix.cc')
-rw-r--r-- | base/global_descriptors_posix.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/base/global_descriptors_posix.cc b/base/global_descriptors_posix.cc index 8c853a0..2fe953c 100644 --- a/base/global_descriptors_posix.cc +++ b/base/global_descriptors_posix.cc @@ -15,6 +15,14 @@ GlobalDescriptors::GlobalDescriptors() {} GlobalDescriptors::~GlobalDescriptors() {} +// static +GlobalDescriptors* GlobalDescriptors::GetInstance() { + typedef Singleton<base::GlobalDescriptors, + LeakySingletonTraits<base::GlobalDescriptors> > + GlobalDescriptorsSingleton; + return GlobalDescriptorsSingleton::get(); +} + int GlobalDescriptors::MaybeGet(Key key) const { for (Mapping::const_iterator i = descriptors_.begin(); i != descriptors_.end(); ++i) { |