diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-25 17:27:20 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-25 17:27:20 +0000 |
commit | 2f4fda47335875e92108a67f4532a97f8c00b4aa (patch) | |
tree | ce20db056bc06d0d503ff89cf738229d43e53495 /base/base_paths_mac.mm | |
parent | 7cb01d9331172089968c1918005765e31a43c027 (diff) | |
download | chromium_src-2f4fda47335875e92108a67f4532a97f8c00b4aa.zip chromium_src-2f4fda47335875e92108a67f4532a97f8c00b4aa.tar.gz chromium_src-2f4fda47335875e92108a67f4532a97f8c00b4aa.tar.bz2 |
Revert 86631 - Fix up PathProvider on the Mac for FILE_MODULE.
PathProvider on the Mac always returned the FILE_EXE for FILE_MODULE,
which isn't necessarily correct.
BUG=NONE
TEST=BUILD
Review URL: http://codereview.chromium.org/7019041
TBR=dmaclach@chromium.org
Review URL: http://codereview.chromium.org/6992071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86649 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/base_paths_mac.mm')
-rw-r--r-- | base/base_paths_mac.mm | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/base/base_paths_mac.mm b/base/base_paths_mac.mm index 90a274c..ec1398b 100644 --- a/base/base_paths_mac.mm +++ b/base/base_paths_mac.mm @@ -1,10 +1,9 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 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 "base/base_paths_mac.h" -#include <dlfcn.h> #import <Foundation/Foundation.h> #include <mach-o/dyld.h> @@ -38,19 +37,6 @@ bool GetNSExecutablePath(FilePath* path) { return true; } -// Returns true if the module for |address| is found. |path| will contain -// the path to the module. Note that |path| may not be absolute. -bool GetModulePathForAddress(FilePath* path, - const void* address) WARN_UNUSED_RESULT; - -bool GetModulePathForAddress(FilePath* path, const void* address) { - Dl_info info; - if (dladdr(address, &info) == 0) - return false; - *path = FilePath(info.dli_fname); - return true; -} - } // namespace namespace base { @@ -58,10 +44,9 @@ namespace base { bool PathProviderMac(int key, FilePath* result) { switch (key) { case base::FILE_EXE: + case base::FILE_MODULE: { return GetNSExecutablePath(result); - case base::FILE_MODULE: - return GetModulePathForAddress(result, - reinterpret_cast<const void*>(&base::PathProviderMac)); + } case base::DIR_CACHE: return base::mac::GetUserDirectory(NSCachesDirectory, result); case base::DIR_APP_DATA: |