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" |
11 | 11 |
12 #if defined(OS_MACOSX) | 12 #if defined(OS_MACOSX) |
13 #if defined(__OBJC__) | 13 #if defined(__OBJC__) |
14 @class NSBundle; | 14 @class NSBundle; |
15 #else | 15 #else |
16 class NSBundle; | 16 class NSBundle; |
17 #endif | 17 #endif |
18 #endif | 18 #endif |
19 | 19 |
20 namespace base { | 20 namespace base { |
21 class FilePath; | 21 class FilePath; |
22 } | 22 } |
23 | 23 |
24 namespace chrome { | 24 namespace chrome { |
25 | 25 |
26 // Get the path to the user's data directory, regardless of whether | 26 // Get the path to the user's data directory, regardless of whether |
27 // DIR_USER_DATA has been overridden by a command-line option. | 27 // DIR_USER_DATA has been overridden by a command-line option. |
28 bool GetDefaultUserDataDirectory(base::FilePath* result); | 28 bool GetDefaultUserDataDirectory(base::FilePath* result); |
29 | 29 |
30 // This returns the base directory in which Chrome Frame stores user profiles. | |
31 // Note that this cannot be wrapped in a preprocessor define since | |
32 // CF and Google Chrome want to share the same binaries. | |
33 bool GetChromeFrameUserDataDirectory(base::FilePath* result); | |
34 | |
35 // Get the path to the user's cache directory. This is normally the | 30 // Get the path to the user's cache directory. This is normally the |
36 // same as the profile directory, but on Linux it can also be | 31 // same as the profile directory, but on Linux it can also be |
37 // $XDG_CACHE_HOME and on Mac it can be under ~/Library/Caches. | 32 // $XDG_CACHE_HOME and on Mac it can be under ~/Library/Caches. |
38 // Note that the Chrome cache directories are actually subdirectories | 33 // Note that the Chrome cache directories are actually subdirectories |
39 // of this directory, with names like "Cache" and "Media Cache". | 34 // of this directory, with names like "Cache" and "Media Cache". |
40 // This will always fill in |result| with a directory, sometimes | 35 // This will always fill in |result| with a directory, sometimes |
41 // just |profile_dir|. | 36 // just |profile_dir|. |
42 void GetUserCacheDirectory(const base::FilePath& profile_dir, base::FilePath* re
sult); | 37 void GetUserCacheDirectory(const base::FilePath& profile_dir, base::FilePath* re
sult); |
43 | 38 |
44 // Get the path to the user's documents directory. | 39 // Get the path to the user's documents directory. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 base::FilePath* result); | 97 base::FilePath* result); |
103 | 98 |
104 #endif // OS_MACOSX && !OS_IOS | 99 #endif // OS_MACOSX && !OS_IOS |
105 | 100 |
106 // Checks if the |process_type| has the rights to access the profile. | 101 // Checks if the |process_type| has the rights to access the profile. |
107 bool ProcessNeedsProfileDir(const std::string& process_type); | 102 bool ProcessNeedsProfileDir(const std::string& process_type); |
108 | 103 |
109 } // namespace chrome | 104 } // namespace chrome |
110 | 105 |
111 #endif // CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ | 106 #endif // CHROME_COMMON_CHROME_PATHS_INTERNAL_H_ |
OLD | NEW |