diff options
author | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 16:48:45 +0000 |
---|---|---|
committer | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 16:48:45 +0000 |
commit | 690a99c80e4fe4e6eda9010b88e4438f57912336 (patch) | |
tree | 423390d4af89abd910ffd69f5e446720b1aa5b1f /base/file_path.h | |
parent | 8c643f00166c14b146f8e5e0d2beedddacb58aab (diff) | |
download | chromium_src-690a99c80e4fe4e6eda9010b88e4438f57912336.zip chromium_src-690a99c80e4fe4e6eda9010b88e4438f57912336.tar.gz chromium_src-690a99c80e4fe4e6eda9010b88e4438f57912336.tar.bz2 |
Move plugins to FilePaths, some cleanup
Review URL: http://codereview.chromium.org/16456
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7588 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_path.h')
-rw-r--r-- | base/file_path.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/base/file_path.h b/base/file_path.h index cadf2cf..7beb40e 100644 --- a/base/file_path.h +++ b/base/file_path.h @@ -69,10 +69,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" - -#if defined(COMPILER_GCC) #include "base/hash_tables.h" -#endif // Windows-style drive letter support and pathname separator characters can be // enabled and disabled independently, to aid testing. These #defines are @@ -204,8 +201,8 @@ class FilePath { #define FILE_PATH_LITERAL(x) L ## x #endif // OS_WIN -#if defined(COMPILER_GCC) // Implement hash function so that we can use FilePaths in hashsets and maps. +#if defined(COMPILER_GCC) namespace __gnu_cxx { template<> @@ -216,6 +213,14 @@ struct hash<FilePath> { }; } // namespace __gnu_cxx -#endif // defined(COMPILER_GCC) +#elif defined(COMPILER_MSVC) +namespace stdext { + +inline size_t hash_value(const FilePath& f) { + return hash_value(f.value()); +} + +} // namespace stdext +#endif // COMPILER #endif // BASE_FILE_PATH_H_ |