Chromium Code Reviews| 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 BASE_BASE_PATHS_H_ | 5 #ifndef BASE_BASE_PATHS_H_ |
| 6 #define BASE_BASE_PATHS_H_ | 6 #define BASE_BASE_PATHS_H_ |
| 7 | 7 |
| 8 // This file declares path keys for the base module. These can be used with | 8 // This file declares path keys for the base module. These can be used with |
| 9 // the PathService to access various special directories and files. | 9 // the PathService to access various special directories and files. |
| 10 | 10 |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 | 12 |
| 13 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
| 14 #include "base/base_paths_win.h" | 14 #include "base/base_paths_win.h" |
| 15 #elif defined(OS_MACOSX) | 15 #elif defined(OS_MACOSX) |
| 16 #include "base/base_paths_mac.h" | 16 #include "base/base_paths_mac.h" |
| 17 #elif defined(OS_ANDROID) | 17 #elif defined(OS_ANDROID) |
| 18 #include "base/base_paths_android.h" | 18 #include "base/base_paths_android.h" |
| 19 #endif | 19 #endif |
| 20 | 20 |
|
grt (UTC plus 2)
2012/09/14 15:35:16
#if defined(OS_POSIX)
#include "base/base_paths_po
gab
2012/09/14 18:10:06
Done.
| |
| 21 namespace base { | 21 namespace base { |
| 22 | 22 |
| 23 enum BasePathKey { | 23 enum BasePathKey { |
| 24 PATH_START = 0, | 24 PATH_START = 0, |
| 25 | 25 |
| 26 DIR_CURRENT, // current directory | 26 DIR_CURRENT, // current directory |
| 27 DIR_EXE, // directory containing FILE_EXE | 27 DIR_EXE, // directory containing FILE_EXE |
| 28 DIR_MODULE, // directory containing FILE_MODULE | 28 DIR_MODULE, // directory containing FILE_MODULE |
| 29 DIR_TEMP, // temporary directory | 29 DIR_TEMP, // temporary directory |
| 30 FILE_EXE, // Path and filename of the current executable. | 30 FILE_EXE, // Path and filename of the current executable. |
| 31 FILE_MODULE, // Path and filename of the module containing the code for the | 31 FILE_MODULE, // Path and filename of the module containing the code for the |
| 32 // PathService (which could differ from FILE_EXE if the | 32 // PathService (which could differ from FILE_EXE if the |
| 33 // PathService were compiled into a shared object, for example). | 33 // PathService were compiled into a shared object, for example). |
| 34 DIR_SOURCE_ROOT, // Returns the root of the source tree. This key is useful | 34 DIR_SOURCE_ROOT, // Returns the root of the source tree. This key is useful |
| 35 // for tests that need to locate various resources. It | 35 // for tests that need to locate various resources. It |
| 36 // should not be used outside of test code. | 36 // should not be used outside of test code. |
| 37 #if defined(OS_POSIX) | 37 DIR_USER_DESKTOP, // Directory that correspond to the current user's desktop. |
|
grt (UTC plus 2)
2012/09/14 15:35:16
these paths are valid for all POSIX-like systems,
gab
2012/09/14 18:10:06
I agree; following the current convention in path_
|
grt (UTC plus 2)
2012/09/14 15:35:16
"The current user's desktop." (the above would ne
gab
2012/09/14 18:10:06
Done.
|
| 38 DIR_CACHE, // Directory where to put cache data. Note this is | |
| 39 // *not* where the browser cache lives, but the | |
| 40 // browser cache can be a subdirectory. | |
| 41 // This is $XDG_CACHE_HOME on Linux and | |
| 42 // ~/Library/Caches on Mac. | |
| 43 DIR_HOME, // $HOME on POSIX-like systems. | |
| 44 #endif | |
| 45 #if defined(OS_ANDROID) | |
| 46 DIR_ANDROID_EXTERNAL_STORAGE, // Android external storage directory. | |
| 47 #endif | |
| 48 | 38 |
| 49 PATH_END | 39 PATH_END |
| 50 }; | 40 }; |
| 51 | 41 |
| 52 } // namespace base | 42 } // namespace base |
| 53 | 43 |
| 54 #endif // BASE_BASE_PATHS_H_ | 44 #endif // BASE_BASE_PATHS_H_ |
| OLD | NEW |