| 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 #ifndef CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ | 5 #ifndef CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ |
| 6 #define CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ | 6 #define CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // Most of the application is further contained within the framework. The | 73 // Most of the application is further contained within the framework. The |
| 74 // framework bundle is located within the versioned directory at a specific | 74 // framework bundle is located within the versioned directory at a specific |
| 75 // path. The only components in the versioned directory not included in the | 75 // path. The only components in the versioned directory not included in the |
| 76 // framework are things that also depend on the framework, such as the helper | 76 // framework are things that also depend on the framework, such as the helper |
| 77 // app bundle. | 77 // app bundle. |
| 78 base::FilePath GetFrameworkBundlePath(); | 78 base::FilePath GetFrameworkBundlePath(); |
| 79 | 79 |
| 80 // Get the local library directory. | 80 // Get the local library directory. |
| 81 bool GetLocalLibraryDirectory(base::FilePath* result); | 81 bool GetLocalLibraryDirectory(base::FilePath* result); |
| 82 | 82 |
| 83 // Get the user library directory. |
| 84 bool GetUserLibraryDirectory(base::FilePath* result); |
| 85 |
| 86 // Get the user applications directory. |
| 87 bool GetUserApplicationsDirectory(base::FilePath* result); |
| 88 |
| 83 // Get the global Application Support directory (under /Library/). | 89 // Get the global Application Support directory (under /Library/). |
| 84 bool GetGlobalApplicationSupportDirectory(base::FilePath* result); | 90 bool GetGlobalApplicationSupportDirectory(base::FilePath* result); |
| 85 | 91 |
| 86 // Returns the NSBundle for the outer browser application, even when running | 92 // Returns the NSBundle for the outer browser application, even when running |
| 87 // inside the helper. In unbundled applications, such as tests, returns nil. | 93 // inside the helper. In unbundled applications, such as tests, returns nil. |
| 88 NSBundle* OuterAppBundle(); | 94 NSBundle* OuterAppBundle(); |
| 89 | 95 |
| 90 // Get the user data directory for the Chrome browser bundle at |bundle|. | 96 // Get the user data directory for the Chrome browser bundle at |bundle|. |
| 91 // |bundle| should be the same value that would be returned from +[NSBundle | 97 // |bundle| should be the same value that would be returned from +[NSBundle |
| 92 // mainBundle] if Chrome were launched normaly. This is used by app shims, | 98 // mainBundle] if Chrome were launched normaly. This is used by app shims, |
| 93 // which run from a bundle which isn't Chrome itself, but which need access to | 99 // which run from a bundle which isn't Chrome itself, but which need access to |
| 94 // the user data directory to connect to a UNIX-domain socket therein. | 100 // the user data directory to connect to a UNIX-domain socket therein. |
| 95 // Returns false if there was a problem fetching the app data directory. | 101 // Returns false if there was a problem fetching the app data directory. |
| 96 bool GetUserDataDirectoryForBrowserBundle(NSBundle* bundle, | 102 bool GetUserDataDirectoryForBrowserBundle(NSBundle* bundle, |
| 97 base::FilePath* result); | 103 base::FilePath* result); |
| 98 | 104 |
| 99 #endif // OS_MACOSX && !OS_IOS | 105 #endif // OS_MACOSX && !OS_IOS |
| 100 | 106 |
| 101 // Checks if the |process_type| has the rights to access the profile. | 107 // Checks if the |process_type| has the rights to access the profile. |
| 102 bool ProcessNeedsProfileDir(const std::string& process_type); | 108 bool ProcessNeedsProfileDir(const std::string& process_type); |
| 103 | 109 |
| 104 } // namespace chrome | 110 } // namespace chrome |
| 105 | 111 |
| 106 #endif // CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ | 112 #endif // CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ |
| OLD | NEW |