OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
11 class FilePath; | 11 class FilePath; |
12 | 12 |
13 namespace chrome { | 13 namespace chrome { |
14 | 14 |
15 // Get the path to the user's data directory, regardless of whether | 15 // Get the path to the user's data directory, regardless of whether |
16 // DIR_USER_DATA has been overridden by a command-line option. | 16 // DIR_USER_DATA has been overridden by a command-line option. |
17 bool GetDefaultUserDataDirectory(FilePath* result); | 17 bool GetDefaultUserDataDirectory(FilePath* result); |
18 | 18 |
19 // This returns the base directory in which Chrome Frame stores user profiles. | 19 // This returns the base directory in which Chrome Frame stores user profiles. |
20 // Note that this cannot be wrapped in a preprocessor define since | 20 // Note that this cannot be wrapped in a preprocessor define since |
21 // CF and Google Chrome want to share the same binaries. | 21 // CF and Google Chrome want to share the same binaries. |
22 bool GetChromeFrameUserDataDirectory(FilePath* result); | 22 bool GetChromeFrameUserDataDirectory(FilePath* result); |
23 | 23 |
| 24 // Get the path to the user's cache directory. This is normally the |
| 25 // same as the profile directory, but on Linux it can also be |
| 26 // $XDG_CACHE_HOME and on Mac it can be under ~/Library/Caches. |
| 27 // Note that the Chrome cache directories are actually subdirectories |
| 28 // of this directory, with names like "Cache" and "Media Cache". |
| 29 // This will always fill in |result| with a directory, sometimes |
| 30 // just |profile_dir|. |
| 31 void GetUserCacheDirectory(const FilePath& profile_dir, FilePath* result); |
| 32 |
24 // Get the path to the user's documents directory. | 33 // Get the path to the user's documents directory. |
25 bool GetUserDocumentsDirectory(FilePath* result); | 34 bool GetUserDocumentsDirectory(FilePath* result); |
26 | 35 |
27 #if defined (OS_WIN) | 36 #if defined (OS_WIN) |
28 // Gets the path to a safe default download directory for a user. | 37 // Gets the path to a safe default download directory for a user. |
29 bool GetUserDownloadsDirectorySafe(FilePath* result); | 38 bool GetUserDownloadsDirectorySafe(FilePath* result); |
30 #endif | 39 #endif |
31 | 40 |
32 // Get the path to the user's downloads directory. | 41 // Get the path to the user's downloads directory. |
33 bool GetUserDownloadsDirectory(FilePath* result); | 42 bool GetUserDownloadsDirectory(FilePath* result); |
(...skipping 23 matching lines...) Expand all Loading... |
57 FilePath GetFrameworkBundlePath(); | 66 FilePath GetFrameworkBundlePath(); |
58 | 67 |
59 // Get the local library directory. | 68 // Get the local library directory. |
60 bool GetLocalLibraryDirectory(FilePath* result); | 69 bool GetLocalLibraryDirectory(FilePath* result); |
61 | 70 |
62 #endif // OS_MACOSX | 71 #endif // OS_MACOSX |
63 | 72 |
64 } // namespace chrome | 73 } // namespace chrome |
65 | 74 |
66 #endif // CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ | 75 #endif // CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ |
OLD | NEW |