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_PATH_SERVICE_H_ | 5 #ifndef BASE_PATH_SERVICE_H_ |
6 #define BASE_PATH_SERVICE_H_ | 6 #define BASE_PATH_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
11 #include "base/base_paths.h" | 11 #include "base/base_paths.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class FilePath; | 16 class FilePath; |
17 class ScopedPathOverride; | 17 class ScopedPathOverride; |
18 } // namespace | 18 } // namespace base |
19 | 19 |
20 // The path service is a global table mapping keys to file system paths. It is | 20 // The path service is a global table mapping keys to file system paths. It is |
21 // OK to use this service from multiple threads. | 21 // OK to use this service from multiple threads. |
22 // | 22 // |
23 class BASE_EXPORT PathService { | 23 class BASE_EXPORT PathService { |
24 public: | 24 public: |
25 // Retrieves a path to a special directory or file and places it into the | 25 // Retrieves a path to a special directory or file and places it into the |
26 // string pointed to by 'path'. If you ask for a directory it is guaranteed | 26 // string pointed to by 'path'. If you ask for a directory it is guaranteed |
27 // to NOT have a path separator at the end. For example, "c:\windows\temp" | 27 // to NOT have a path separator at the end. For example, "c:\windows\temp" |
28 // Directories are also guaranteed to exist when this function succeeds. | 28 // Directories are also guaranteed to exist when this function succeeds. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 friend class base::ScopedPathOverride; | 83 friend class base::ScopedPathOverride; |
84 FRIEND_TEST_ALL_PREFIXES(PathServiceTest, RemoveOverride); | 84 FRIEND_TEST_ALL_PREFIXES(PathServiceTest, RemoveOverride); |
85 | 85 |
86 // Removes an override for a special directory or file. Returns true if there | 86 // Removes an override for a special directory or file. Returns true if there |
87 // was an override to remove or false if none was present. | 87 // was an override to remove or false if none was present. |
88 // NOTE: This function is intended to be used by tests only! | 88 // NOTE: This function is intended to be used by tests only! |
89 static bool RemoveOverride(int key); | 89 static bool RemoveOverride(int key); |
90 }; | 90 }; |
91 | 91 |
92 #endif // BASE_PATH_SERVICE_H_ | 92 #endif // BASE_PATH_SERVICE_H_ |
OLD | NEW |