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> |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 NSBundle* OuterAppBundle() { | 226 NSBundle* OuterAppBundle() { |
227 // Cache this. Foundation leaks it anyway, and this should be the only call | 227 // Cache this. Foundation leaks it anyway, and this should be the only call |
228 // to OuterAppBundleInternal(). | 228 // to OuterAppBundleInternal(). |
229 static NSBundle* bundle = OuterAppBundleInternal(); | 229 static NSBundle* bundle = OuterAppBundleInternal(); |
230 return bundle; | 230 return bundle; |
231 } | 231 } |
232 | 232 |
233 bool GetUserDataDirectoryForBrowserBundle(NSBundle* bundle, | 233 bool GetUserDataDirectoryForBrowserBundle(NSBundle* bundle, |
234 base::FilePath* result) { | 234 base::FilePath* result) { |
235 scoped_ptr_malloc<char> product_dir_name(ProductDirNameForBundle(bundle)); | 235 scoped_ptr<char, base::FreeDeleter> |
| 236 product_dir_name(ProductDirNameForBundle(bundle)); |
236 return GetDefaultUserDataDirectoryForProduct(product_dir_name.get(), result); | 237 return GetDefaultUserDataDirectoryForProduct(product_dir_name.get(), result); |
237 } | 238 } |
238 | 239 |
239 #endif // !defined(OS_IOS) | 240 #endif // !defined(OS_IOS) |
240 | 241 |
241 bool ProcessNeedsProfileDir(const std::string& process_type) { | 242 bool ProcessNeedsProfileDir(const std::string& process_type) { |
242 // For now we have no reason to forbid this on other MacOS as we don't | 243 // For now we have no reason to forbid this on other MacOS as we don't |
243 // have the roaming profile troubles there. | 244 // have the roaming profile troubles there. |
244 return true; | 245 return true; |
245 } | 246 } |
246 | 247 |
247 } // namespace chrome | 248 } // namespace chrome |
OLD | NEW |