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 CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_PATH_FILTER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_PATH_FILTER_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_PATH_FILTER_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_PATH_FILTER_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 #include "base/containers/hash_tables.h" | 13 #include "base/containers/hash_tables.h" |
12 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/macros.h" |
13 #include "base/sequence_checker.h" | 16 #include "base/sequence_checker.h" |
14 #include "chrome/browser/media_galleries/media_scan_types.h" | 17 #include "chrome/browser/media_galleries/media_scan_types.h" |
15 | 18 |
16 // This class holds the list of file path extensions that we should expose on | 19 // This class holds the list of file path extensions that we should expose on |
17 // media filesystem. | 20 // media filesystem. |
18 class MediaPathFilter { | 21 class MediaPathFilter { |
19 public: | 22 public: |
20 // Used to skip hidden folders and files. Returns true if the file specified | 23 // Used to skip hidden folders and files. Returns true if the file specified |
21 // by |path| should be skipped. | 24 // by |path| should be skipped. |
22 static bool ShouldSkip(const base::FilePath& path); | 25 static bool ShouldSkip(const base::FilePath& path); |
(...skipping 30 matching lines...) Expand all Loading... |
53 | 56 |
54 // Checks |initialized_| is only accessed on one sequence. | 57 // Checks |initialized_| is only accessed on one sequence. |
55 base::SequenceChecker sequence_checker_; | 58 base::SequenceChecker sequence_checker_; |
56 bool initialized_; | 59 bool initialized_; |
57 MediaFileExtensionMap media_file_extensions_map_; | 60 MediaFileExtensionMap media_file_extensions_map_; |
58 | 61 |
59 DISALLOW_COPY_AND_ASSIGN(MediaPathFilter); | 62 DISALLOW_COPY_AND_ASSIGN(MediaPathFilter); |
60 }; | 63 }; |
61 | 64 |
62 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_PATH_FILTER_H_ | 65 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_PATH_FILTER_H_ |
OLD | NEW |