Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7309)

Unified Diff: chrome/browser/media_galleries/fileapi/media_path_filter.h

Issue 1695563002: Media Galleries Partial Deprecation: Remove scan functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media_galleries/fileapi/media_path_filter.h
diff --git a/chrome/browser/media_galleries/fileapi/media_path_filter.h b/chrome/browser/media_galleries/fileapi/media_path_filter.h
index 9f84f970bab8b93057d7ea3cbf2d6b14bece72bd..6e9fe5b3a3f255c443b096341a3dbccc377353a8 100644
--- a/chrome/browser/media_galleries/fileapi/media_path_filter.h
+++ b/chrome/browser/media_galleries/fileapi/media_path_filter.h
@@ -14,7 +14,13 @@
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/sequence_checker.h"
-#include "chrome/browser/media_galleries/media_scan_types.h"
+
+enum MediaGalleryFileType {
+ MEDIA_GALLERY_FILE_TYPE_UNKNOWN = 0,
+ MEDIA_GALLERY_FILE_TYPE_AUDIO = 1 << 0,
+ MEDIA_GALLERY_FILE_TYPE_IMAGE = 1 << 1,
+ MEDIA_GALLERY_FILE_TYPE_VIDEO = 1 << 2,
+};
// This class holds the list of file path extensions that we should expose on
// media filesystem.
@@ -30,29 +36,29 @@ class MediaPathFilter {
// Returns true if |path| is a media file.
bool Match(const base::FilePath& path);
- // Returns the type of |path| or MEDIA_GALLERY_SCAN_FILE_TYPE_UNKNOWN if it
+ // Returns the type of |path| or MEDIA_GALLERY_FILE_TYPE_UNKNOWN if it
// is not a media file.
- MediaGalleryScanFileType GetType(const base::FilePath& path);
+ MediaGalleryFileType GetType(const base::FilePath& path);
private:
typedef std::vector<base::FilePath::StringType> MediaFileExtensionList;
// Key: .extension
- // Value: MediaGalleryScanFileType, but stored as an int to allow "|="
+ // Value: MediaGalleryFileType, but stored as an int to allow "|="
typedef base::hash_map<base::FilePath::StringType, int> MediaFileExtensionMap;
void EnsureInitialized();
void AddExtensionsToMediaFileExtensionMap(
const MediaFileExtensionList& extensions_list,
- MediaGalleryScanFileType type);
+ MediaGalleryFileType type);
void AddAdditionalExtensionsToMediaFileExtensionMap(
const base::FilePath::CharType* const* extensions_list,
size_t extensions_list_size,
- MediaGalleryScanFileType type);
+ MediaGalleryFileType type);
void AddExtensionToMediaFileExtensionMap(
const base::FilePath::CharType* extension,
- MediaGalleryScanFileType type);
+ MediaGalleryFileType type);
// Checks |initialized_| is only accessed on one sequence.
base::SequenceChecker sequence_checker_;

Powered by Google App Engine
This is Rietveld 408576698