| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/public/common/content_switches.h" |
| 19 | 20 |
| 20 namespace { | 21 namespace { |
| 21 | 22 |
| 22 const FilePath* g_override_versioned_directory = NULL; | 23 const FilePath* g_override_versioned_directory = NULL; |
| 23 | 24 |
| 24 // Return a retained (NOT autoreleased) NSBundle* as the internal | 25 // Return a retained (NOT autoreleased) NSBundle* as the internal |
| 25 // implementation of chrome::OuterAppBundle(), which should be the only | 26 // implementation of chrome::OuterAppBundle(), which should be the only |
| 26 // caller. | 27 // caller. |
| 27 NSBundle* OuterAppBundleInternal() { | 28 NSBundle* OuterAppBundleInternal() { |
| 28 base::mac::ScopedNSAutoreleasePool pool; | 29 base::mac::ScopedNSAutoreleasePool pool; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 return base::mac::GetLocalDirectory(NSLibraryDirectory, result); | 193 return base::mac::GetLocalDirectory(NSLibraryDirectory, result); |
| 193 } | 194 } |
| 194 | 195 |
| 195 NSBundle* OuterAppBundle() { | 196 NSBundle* OuterAppBundle() { |
| 196 // Cache this. Foundation leaks it anyway, and this should be the only call | 197 // Cache this. Foundation leaks it anyway, and this should be the only call |
| 197 // to OuterAppBundleInternal(). | 198 // to OuterAppBundleInternal(). |
| 198 static NSBundle* bundle = OuterAppBundleInternal(); | 199 static NSBundle* bundle = OuterAppBundleInternal(); |
| 199 return bundle; | 200 return bundle; |
| 200 } | 201 } |
| 201 | 202 |
| 203 bool ProcessNeedsProfileDir(const std::string& process_type) { |
| 204 // For now we have no reason to forbid this on other MacOS as we don't |
| 205 // have the roaming profile troubles there. |
| 206 return true; |
| 207 } |
| 208 |
| 202 } // namespace chrome | 209 } // namespace chrome |
| OLD | NEW |