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

Unified Diff: chrome/common/chrome_paths_mac.mm

Issue 11418005: Get a minimal unit_tests target building and running for iOS (Closed) Base URL: http://git.chromium.org/chromium/src.git@chrome-gyp-ios-support
Patch Set: Better ifdefing in chrome_paths Created 8 years, 1 month 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 | « chrome/common/chrome_paths_internal.h ('k') | chrome/common/chrome_version_info_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_paths_mac.mm
diff --git a/chrome/common/chrome_paths_mac.mm b/chrome/common/chrome_paths_mac.mm
index 5b63f47f07b2f0dd4892ccfecd8b0649b80c5e52..54729039d917ff920e36ca8a521efcb2e8d2ba23 100644
--- a/chrome/common/chrome_paths_mac.mm
+++ b/chrome/common/chrome_paths_mac.mm
@@ -12,13 +12,17 @@
#include "base/base_paths.h"
#include "base/logging.h"
#import "base/mac/foundation_util.h"
-#import "base/mac/mac_util.h"
#import "base/mac/scoped_nsautorelease_pool.h"
#include "base/path_service.h"
#include "chrome/common/chrome_constants.h"
+#if !defined(OS_IOS)
+#import "base/mac/mac_util.h"
+#endif
+
namespace {
+#if !defined(OS_IOS)
const FilePath* g_override_versioned_directory = NULL;
// Return a retained (NOT autoreleased) NSBundle* as the internal
@@ -45,8 +49,11 @@ NSBundle* OuterAppBundleInternal() {
return [[NSBundle bundleWithPath:outer_app_dir_ns] retain];
}
+#endif // !defined(OS_IOS)
const char* ProductDirNameInternal() {
+ const char* product_dir_name = NULL;
+#if !defined(OS_IOS)
base::mac::ScopedNSAutoreleasePool pool;
// Use OuterAppBundle() to get the main app's bundle. This key needs to live
@@ -61,7 +68,8 @@ const char* ProductDirNameInternal() {
NSBundle* bundle = chrome::OuterAppBundle();
NSString* product_dir_name_ns =
[bundle objectForInfoDictionaryKey:@"CrProductDirName"];
- const char* product_dir_name = [product_dir_name_ns fileSystemRepresentation];
+ product_dir_name = [product_dir_name_ns fileSystemRepresentation];
+#endif
if (!product_dir_name) {
#if defined(GOOGLE_CHROME_BUILD)
@@ -105,10 +113,6 @@ bool GetUserDocumentsDirectory(FilePath* result) {
return base::mac::GetUserDirectory(NSDocumentDirectory, result);
}
-bool GetGlobalApplicationSupportDirectory(FilePath* result) {
- return base::mac::GetLocalDirectory(NSApplicationSupportDirectory, result);
-}
-
void GetUserCacheDirectory(const FilePath& profile_dir, FilePath* result) {
// If the profile directory is under ~/Library/Application Support,
// use a suitable cache directory under ~/Library/Caches. For
@@ -147,6 +151,8 @@ bool GetUserVideosDirectory(FilePath* result) {
return base::mac::GetUserDirectory(NSMoviesDirectory, result);
}
+#if !defined(OS_IOS)
+
FilePath GetVersionedDirectory() {
if (g_override_versioned_directory)
return *g_override_versioned_directory;
@@ -200,6 +206,10 @@ bool GetLocalLibraryDirectory(FilePath* result) {
return base::mac::GetLocalDirectory(NSLibraryDirectory, result);
}
+bool GetGlobalApplicationSupportDirectory(FilePath* result) {
+ return base::mac::GetLocalDirectory(NSApplicationSupportDirectory, result);
+}
+
NSBundle* OuterAppBundle() {
// Cache this. Foundation leaks it anyway, and this should be the only call
// to OuterAppBundleInternal().
@@ -207,6 +217,8 @@ NSBundle* OuterAppBundle() {
return bundle;
}
+#endif // !defined(OS_IOS)
+
bool ProcessNeedsProfileDir(const std::string& process_type) {
// For now we have no reason to forbid this on other MacOS as we don't
// have the roaming profile troubles there.
« no previous file with comments | « chrome/common/chrome_paths_internal.h ('k') | chrome/common/chrome_version_info_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698