| 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 | |
| 89 // Get the global Application Support directory (under /Library/). | 83 // Get the global Application Support directory (under /Library/). |
| 90 bool GetGlobalApplicationSupportDirectory(base::FilePath* result); | 84 bool GetGlobalApplicationSupportDirectory(base::FilePath* result); |
| 91 | 85 |
| 92 // Returns the NSBundle for the outer browser application, even when running | 86 // Returns the NSBundle for the outer browser application, even when running |
| 93 // inside the helper. In unbundled applications, such as tests, returns nil. | 87 // inside the helper. In unbundled applications, such as tests, returns nil. |
| 94 NSBundle* OuterAppBundle(); | 88 NSBundle* OuterAppBundle(); |
| 95 | 89 |
| 96 // Get the user data directory for the Chrome browser bundle at |bundle|. | 90 // Get the user data directory for the Chrome browser bundle at |bundle|. |
| 97 // |bundle| should be the same value that would be returned from +[NSBundle | 91 // |bundle| should be the same value that would be returned from +[NSBundle |
| 98 // mainBundle] if Chrome were launched normaly. This is used by app shims, | 92 // mainBundle] if Chrome were launched normaly. This is used by app shims, |
| 99 // which run from a bundle which isn't Chrome itself, but which need access to | 93 // which run from a bundle which isn't Chrome itself, but which need access to |
| 100 // the user data directory to connect to a UNIX-domain socket therein. | 94 // the user data directory to connect to a UNIX-domain socket therein. |
| 101 // Returns false if there was a problem fetching the app data directory. | 95 // Returns false if there was a problem fetching the app data directory. |
| 102 bool GetUserDataDirectoryForBrowserBundle(NSBundle* bundle, | 96 bool GetUserDataDirectoryForBrowserBundle(NSBundle* bundle, |
| 103 base::FilePath* result); | 97 base::FilePath* result); |
| 104 | 98 |
| 105 #endif // OS_MACOSX | 99 #endif // OS_MACOSX |
| 106 // Checks if the |process_type| has the rights to access the profile. | 100 // Checks if the |process_type| has the rights to access the profile. |
| 107 bool ProcessNeedsProfileDir(const std::string& process_type); | 101 bool ProcessNeedsProfileDir(const std::string& process_type); |
| 108 | 102 |
| 109 #if defined(OS_WIN) | 103 #if defined(OS_WIN) |
| 110 // Populates |crash_dir| with the default crash dump location regardless of | 104 // Populates |crash_dir| with the default crash dump location regardless of |
| 111 // whether DIR_USER_DATA or DIR_CRASH_DUMPS has been overridden. | 105 // whether DIR_USER_DATA or DIR_CRASH_DUMPS has been overridden. |
| 112 bool GetDefaultCrashDumpLocation(base::FilePath* crash_dir); | 106 bool GetDefaultCrashDumpLocation(base::FilePath* crash_dir); |
| 113 #endif | 107 #endif |
| 114 | 108 |
| 115 } // namespace chrome | 109 } // namespace chrome |
| 116 | 110 |
| 117 #endif // CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ | 111 #endif // CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ |
| OLD | NEW |