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 /chrome | |
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 'chrome')
-rw-r--r-- | chrome/app/breakpad_linux.cc | 2 | ||||
-rw-r--r-- | chrome/app/chrome_main.cc | 5 | ||||
-rw-r--r-- | chrome/browser/diagnostics/diagnostics_main.cc | 4 | ||||
-rw-r--r-- | chrome/browser/zygote_main_linux.cc | 2 |
4 files changed, 5 insertions, 8 deletions
diff --git a/chrome/app/breakpad_linux.cc b/chrome/app/breakpad_linux.cc index 1f55a5d..44e6355 100644 --- a/chrome/app/breakpad_linux.cc +++ b/chrome/app/breakpad_linux.cc @@ -729,7 +729,7 @@ NonBrowserCrashHandler(const void* crash_context, size_t crash_context_size, } void EnableNonBrowserCrashDumping() { - const int fd = Singleton<base::GlobalDescriptors>()->Get(kCrashDumpSignal); + const int fd = base::GlobalDescriptors::GetInstance()->Get(kCrashDumpSignal); is_crash_reporter_enabled = true; // We deliberately leak this object. google_breakpad::ExceptionHandler* handler = diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc index 41b522e..491366c 100644 --- a/chrome/app/chrome_main.cc +++ b/chrome/app/chrome_main.cc @@ -250,10 +250,7 @@ void LowLevelInit() { SetupSignalHandlers(); - typedef Singleton<base::GlobalDescriptors, - LeakySingletonTraits<base::GlobalDescriptors> > - GlobalDescriptorsSingleton; - base::GlobalDescriptors* g_fds = GlobalDescriptorsSingleton::get(); + base::GlobalDescriptors* g_fds = base::GlobalDescriptors::GetInstance(); g_fds->Set(kPrimaryIPCChannel, kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor); #if defined(OS_LINUX) diff --git a/chrome/browser/diagnostics/diagnostics_main.cc b/chrome/browser/diagnostics/diagnostics_main.cc index bf88222..2f654c2 100644 --- a/chrome/browser/diagnostics/diagnostics_main.cc +++ b/chrome/browser/diagnostics/diagnostics_main.cc @@ -315,8 +315,8 @@ class TestController : public DiagnosticsModel::Observer { // -(all) RegisterInvalidParamHandler() // -(all) base::AtExitManager::AtExitManager() // -(macOS) base::ScopedNSAutoreleasePool -// -(posix) Singleton<base::GlobalDescriptors>::Set(kPrimaryIPCChannel) -// -(linux) Singleton<base::GlobalDescriptors>::Set(kCrashDumpSignal) +// -(posix) base::GlobalDescriptors::GetInstance()->Set(kPrimaryIPCChannel) +// -(linux) base::GlobalDescriptors::GetInstance()->Set(kCrashDumpSignal) // -(posix) setlocale(LC_ALL,..) // -(all) CommandLine::Init(); diff --git a/chrome/browser/zygote_main_linux.cc b/chrome/browser/zygote_main_linux.cc index 008d3a4..5943d11 100644 --- a/chrome/browser/zygote_main_linux.cc +++ b/chrome/browser/zygote_main_linux.cc @@ -382,7 +382,7 @@ class Zygote { close(kBrowserDescriptor); // our socket from the browser if (g_suid_sandbox_active) close(kZygoteIdDescriptor); // another socket from the browser - Singleton<base::GlobalDescriptors>()->Reset(mapping); + base::GlobalDescriptors::GetInstance()->Reset(mapping); #if defined(CHROMIUM_SELINUX) SELinuxTransitionToTypeOrDie("chromium_renderer_t"); |