Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: content/browser/mach_broker_mac.mm

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/mach_broker_mac.h" 5 #include "content/browser/mach_broker_mac.h"
6 6
7 #include <bsm/libbsm.h> 7 #include <bsm/libbsm.h>
8 #include <servers/bootstrap.h> 8 #include <servers/bootstrap.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 0, MACH_PORT_NULL, 100 /*milliseconds*/, MACH_PORT_NULL); 71 0, MACH_PORT_NULL, 100 /*milliseconds*/, MACH_PORT_NULL);
72 if (kr != KERN_SUCCESS) { 72 if (kr != KERN_SUCCESS) {
73 MACH_LOG(ERROR, kr) << "mach_msg"; 73 MACH_LOG(ERROR, kr) << "mach_msg";
74 return false; 74 return false;
75 } 75 }
76 76
77 return true; 77 return true;
78 } 78 }
79 79
80 MachBroker* MachBroker::GetInstance() { 80 MachBroker* MachBroker::GetInstance() {
81 return Singleton<MachBroker, LeakySingletonTraits<MachBroker>>::get(); 81 return base::Singleton<MachBroker,
82 base::LeakySingletonTraits<MachBroker>>::get();
82 } 83 }
83 84
84 base::Lock& MachBroker::GetLock() { 85 base::Lock& MachBroker::GetLock() {
85 return lock_; 86 return lock_;
86 } 87 }
87 88
88 void MachBroker::EnsureRunning() { 89 void MachBroker::EnsureRunning() {
89 lock_.AssertAcquired(); 90 lock_.AssertAcquired();
90 91
91 if (initialized_) 92 if (initialized_)
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 NotificationService::AllBrowserContextsAndSources()); 262 NotificationService::AllBrowserContextsAndSources());
262 registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_TERMINATED, 263 registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_TERMINATED,
263 NotificationService::AllBrowserContextsAndSources()); 264 NotificationService::AllBrowserContextsAndSources());
264 265
265 // No corresponding StopObservingBrowserChildProcesses, 266 // No corresponding StopObservingBrowserChildProcesses,
266 // we leak this singleton. 267 // we leak this singleton.
267 BrowserChildProcessObserver::Add(this); 268 BrowserChildProcessObserver::Add(this);
268 } 269 }
269 270
270 } // namespace content 271 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/mach_broker_mac.h ('k') | content/browser/media/android/media_drm_credential_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698