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

Unified Diff: base/base_paths_mac.mm

Issue 6992071: Revert 86631 - Fix up PathProvider on the Mac for FILE_MODULE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/chrome_exe.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/base_paths_mac.mm
===================================================================
--- base/base_paths_mac.mm (revision 86648)
+++ base/base_paths_mac.mm (working copy)
@@ -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 @@
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 @@
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:
Property changes on: base/base_paths_mac.mm
___________________________________________________________________
Added: svn:mergeinfo
« no previous file with comments | « no previous file | chrome/chrome_exe.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698