summaryrefslogtreecommitdiffstats
path: root/chrome/browser/mach_broker_mac.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 08:04:53 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 08:04:53 +0000
commit3a3085e4167ef0a9e9b0b8c31930e2e61dc210fc (patch)
treeb8b73d5e2d2418bd3a15e0ffdc488080cc21d27d /chrome/browser/mach_broker_mac.cc
parent2191d2082e2bf1f937ec4592b4f8c185f04f3fd6 (diff)
downloadchromium_src-3a3085e4167ef0a9e9b0b8c31930e2e61dc210fc.zip
chromium_src-3a3085e4167ef0a9e9b0b8c31930e2e61dc210fc.tar.gz
chromium_src-3a3085e4167ef0a9e9b0b8c31930e2e61dc210fc.tar.bz2
Revert 34146 - A place to store the pid>mach_port_t mapping.
Not yet for review. Landing to measure perf impact, will revert immediately. BUG=13156 TEST=unittests Review URL: http://codereview.chromium.org/460126 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/466088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34147 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/mach_broker_mac.cc')
-rw-r--r--chrome/browser/mach_broker_mac.cc47
1 files changed, 0 insertions, 47 deletions
diff --git a/chrome/browser/mach_broker_mac.cc b/chrome/browser/mach_broker_mac.cc
deleted file mode 100644
index 6d9779e..0000000
--- a/chrome/browser/mach_broker_mac.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2009 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.
-
-#include "chrome/browser/mach_broker_mac.h"
-
-#include "base/logging.h"
-
-// Constructor.
-MachBroker::MachBroker() {}
-
-// Returns the global MachBroker.
-MachBroker* MachBroker::instance() {
- return Singleton<MachBroker>::get();
-}
-
-// Returns the mach task belonging to |pid|.
-mach_port_t MachBroker::MachTaskForPid(base::ProcessHandle pid) const {
- AutoLock lock(lock_);
- MachBroker::MachMap::const_iterator it = mach_map_.find(pid);
- if (it == mach_map_.end())
- return 0;
- return it->second.mach_task_;
-}
-
-// Returns the mach host belonging to |pid|.
-mach_port_t MachBroker::MachHostForPid(base::ProcessHandle pid) const {
- AutoLock lock(lock_);
- MachMap::const_iterator it = mach_map_.find(pid);
- if (it == mach_map_.end())
- return 0;
- return it->second.mach_host_;
-}
-
-// Adds mach info for a given pid.
-void MachBroker::RegisterPid(
- base::ProcessHandle pid, const MachInfo& mach_info) {
- AutoLock lock(lock_);
- DCHECK(mach_map_.count(pid) == 0);
- mach_map_[pid] = mach_info;
-}
-
-// Removes all mappings belonging to |pid| from the broker.
-void MachBroker::Invalidate(base::ProcessHandle pid) {
- AutoLock lock(lock_);
- mach_map_.erase(pid);
-}