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 // FilePath is a container for pathnames stored in a platform's native string | 5 // FilePath is a container for pathnames stored in a platform's native string |
6 // type, providing containers for manipulation in according with the | 6 // type, providing containers for manipulation in according with the |
7 // platform's conventions for pathnames. It supports the following path | 7 // platform's conventions for pathnames. It supports the following path |
8 // types: | 8 // types: |
9 // | 9 // |
10 // POSIX Windows | 10 // POSIX Windows |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 #include <stddef.h> | 105 #include <stddef.h> |
106 | 106 |
107 #include <iosfwd> | 107 #include <iosfwd> |
108 #include <string> | 108 #include <string> |
109 #include <vector> | 109 #include <vector> |
110 | 110 |
111 #include "base/base_export.h" | 111 #include "base/base_export.h" |
112 #include "base/compiler_specific.h" | 112 #include "base/compiler_specific.h" |
113 #include "base/containers/hash_tables.h" | 113 #include "base/containers/hash_tables.h" |
| 114 #include "base/macros.h" |
114 #include "base/strings/string16.h" | 115 #include "base/strings/string16.h" |
115 #include "base/strings/string_piece.h" | 116 #include "base/strings/string_piece.h" |
116 #include "build/build_config.h" | 117 #include "build/build_config.h" |
117 | 118 |
118 // Windows-style drive letter support and pathname separator characters can be | 119 // Windows-style drive letter support and pathname separator characters can be |
119 // enabled and disabled independently, to aid testing. These #defines are | 120 // enabled and disabled independently, to aid testing. These #defines are |
120 // here so that the same setting can be used in both the implementation and | 121 // here so that the same setting can be used in both the implementation and |
121 // in the unit test. | 122 // in the unit test. |
122 #if defined(OS_WIN) | 123 #if defined(OS_WIN) |
123 #define FILE_PATH_USES_DRIVE_LETTERS | 124 #define FILE_PATH_USES_DRIVE_LETTERS |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 template<> | 468 template<> |
468 struct hash<base::FilePath> { | 469 struct hash<base::FilePath> { |
469 size_t operator()(const base::FilePath& f) const { | 470 size_t operator()(const base::FilePath& f) const { |
470 return hash<base::FilePath::StringType>()(f.value()); | 471 return hash<base::FilePath::StringType>()(f.value()); |
471 } | 472 } |
472 }; | 473 }; |
473 | 474 |
474 } // namespace BASE_HASH_NAMESPACE | 475 } // namespace BASE_HASH_NAMESPACE |
475 | 476 |
476 #endif // BASE_FILES_FILE_PATH_H_ | 477 #endif // BASE_FILES_FILE_PATH_H_ |
OLD | NEW |