| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/common/chrome_paths_internal.h" | 5 #include "chrome/common/chrome_paths_internal.h" |
| 6 | 6 |
| 7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/base_paths.h" | 12 #include "base/base_paths.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #import "base/mac/foundation_util.h" | 14 #import "base/mac/foundation_util.h" |
| 15 #import "base/mac/mac_util.h" | 15 #import "base/mac/mac_util.h" |
| 16 #import "base/mac/scoped_nsautorelease_pool.h" | 16 #import "base/mac/scoped_nsautorelease_pool.h" |
| 17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 18 #include "chrome/common/chrome_constants.h" | 18 #include "chrome/common/chrome_constants.h" |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // TODO(thestig) Remove this once we switch to the 10.6 SDK. | |
| 23 #if !defined(MAC_OS_X_VERSION_10_6) || \ | |
| 24 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 | |
| 25 #define NSPicturesDirectory 19 | |
| 26 #endif | |
| 27 | |
| 28 const FilePath* g_override_versioned_directory = NULL; | 22 const FilePath* g_override_versioned_directory = NULL; |
| 29 | 23 |
| 30 // Return a retained (NOT autoreleased) NSBundle* as the internal | 24 // Return a retained (NOT autoreleased) NSBundle* as the internal |
| 31 // implementation of chrome::OuterAppBundle(), which should be the only | 25 // implementation of chrome::OuterAppBundle(), which should be the only |
| 32 // caller. | 26 // caller. |
| 33 NSBundle* OuterAppBundleInternal() { | 27 NSBundle* OuterAppBundleInternal() { |
| 34 base::mac::ScopedNSAutoreleasePool pool; | 28 base::mac::ScopedNSAutoreleasePool pool; |
| 35 | 29 |
| 36 if (!base::mac::AmIBundled()) { | 30 if (!base::mac::AmIBundled()) { |
| 37 // If unbundled (as in a test), there's no app bundle. | 31 // If unbundled (as in a test), there's no app bundle. |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 return bundle; | 203 return bundle; |
| 210 } | 204 } |
| 211 | 205 |
| 212 bool ProcessNeedsProfileDir(const std::string& process_type) { | 206 bool ProcessNeedsProfileDir(const std::string& process_type) { |
| 213 // For now we have no reason to forbid this on other MacOS as we don't | 207 // For now we have no reason to forbid this on other MacOS as we don't |
| 214 // have the roaming profile troubles there. | 208 // have the roaming profile troubles there. |
| 215 return true; | 209 return true; |
| 216 } | 210 } |
| 217 | 211 |
| 218 } // namespace chrome | 212 } // namespace chrome |
| OLD | NEW |