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 WEBKIT_FILEAPI_MEDIA_MEDIA_PATH_FILTER_H_ | 5 #ifndef WEBKIT_FILEAPI_MEDIA_MEDIA_PATH_FILTER_H_ |
6 #define WEBKIT_FILEAPI_MEDIA_MEDIA_PATH_FILTER_H_ | 6 #define WEBKIT_FILEAPI_MEDIA_MEDIA_PATH_FILTER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
12 #include "webkit/storage/webkit_storage_export.h" | 12 #include "webkit/storage/webkit_storage_export.h" |
13 | 13 |
| 14 namespace base { |
14 class FilePath; | 15 class FilePath; |
| 16 } |
15 | 17 |
16 namespace fileapi { | 18 namespace fileapi { |
17 | 19 |
18 // This class holds the list of file path extensions that we should expose on | 20 // This class holds the list of file path extensions that we should expose on |
19 // media filesystem. | 21 // media filesystem. |
20 class WEBKIT_STORAGE_EXPORT MediaPathFilter { | 22 class WEBKIT_STORAGE_EXPORT MediaPathFilter { |
21 public: | 23 public: |
22 MediaPathFilter(); | 24 MediaPathFilter(); |
23 ~MediaPathFilter(); | 25 ~MediaPathFilter(); |
24 bool Match(const FilePath& path); | 26 bool Match(const base::FilePath& path); |
25 | 27 |
26 private: | 28 private: |
27 typedef std::vector<FilePath::StringType> MediaFileExtensionList; | 29 typedef std::vector<base::FilePath::StringType> MediaFileExtensionList; |
28 | 30 |
29 void EnsureInitialized(); | 31 void EnsureInitialized(); |
30 | 32 |
31 bool initialized_; | 33 bool initialized_; |
32 base::Lock initialization_lock_; | 34 base::Lock initialization_lock_; |
33 MediaFileExtensionList media_file_extensions_; | 35 MediaFileExtensionList media_file_extensions_; |
34 | 36 |
35 DISALLOW_COPY_AND_ASSIGN(MediaPathFilter); | 37 DISALLOW_COPY_AND_ASSIGN(MediaPathFilter); |
36 }; | 38 }; |
37 | 39 |
38 } // namespace fileapi | 40 } // namespace fileapi |
39 | 41 |
40 #endif // WEBKIT_FILEAPI_MEDIA_MEDIA_PATH_FILTER_H_ | 42 #endif // WEBKIT_FILEAPI_MEDIA_MEDIA_PATH_FILTER_H_ |
OLD | NEW |