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 | |
33 // Get the path to the user's documents directory. | 24 // Get the path to the user's documents directory. |
34 bool GetUserDocumentsDirectory(FilePath* result); | 25 bool GetUserDocumentsDirectory(FilePath* result); |
35 | 26 |
36 #if defined (OS_WIN) | 27 #if defined (OS_WIN) |
37 // Gets the path to a safe default download directory for a user. | 28 // Gets the path to a safe default download directory for a user. |
38 bool GetUserDownloadsDirectorySafe(FilePath* result); | 29 bool GetUserDownloadsDirectorySafe(FilePath* result); |
39 #endif | 30 #endif |
40 | 31 |
41 // Get the path to the user's downloads directory. | 32 // Get the path to the user's downloads directory. |
42 bool GetUserDownloadsDirectory(FilePath* result); | 33 bool GetUserDownloadsDirectory(FilePath* result); |
(...skipping 23 matching lines...) Expand all Loading... |
66 FilePath GetFrameworkBundlePath(); | 57 FilePath GetFrameworkBundlePath(); |
67 | 58 |
68 // Get the local library directory. | 59 // Get the local library directory. |
69 bool GetLocalLibraryDirectory(FilePath* result); | 60 bool GetLocalLibraryDirectory(FilePath* result); |
70 | 61 |
71 #endif // OS_MACOSX | 62 #endif // OS_MACOSX |
72 | 63 |
73 } // namespace chrome | 64 } // namespace chrome |
74 | 65 |
75 #endif // CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ | 66 #endif // CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ |
OLD | NEW |