| 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 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" | 5 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/macros.h" |
| 14 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "build/build_config.h" |
| 15 #include "components/mime_util/mime_util.h" | 17 #include "components/mime_util/mime_util.h" |
| 16 #include "net/base/mime_util.h" | 18 #include "net/base/mime_util.h" |
| 17 | 19 |
| 18 namespace { | 20 namespace { |
| 19 | 21 |
| 20 const base::FilePath::CharType* const kExtraSupportedImageExtensions[] = { | 22 const base::FilePath::CharType* const kExtraSupportedImageExtensions[] = { |
| 21 // RAW picture file types. | 23 // RAW picture file types. |
| 22 // Some of which are just image/tiff. | 24 // Some of which are just image/tiff. |
| 23 FILE_PATH_LITERAL("3fr"), // (Hasselblad) | 25 FILE_PATH_LITERAL("3fr"), // (Hasselblad) |
| 24 FILE_PATH_LITERAL("arw"), // (Sony) | 26 FILE_PATH_LITERAL("arw"), // (Sony) |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 } | 206 } |
| 205 | 207 |
| 206 void MediaPathFilter::AddExtensionToMediaFileExtensionMap( | 208 void MediaPathFilter::AddExtensionToMediaFileExtensionMap( |
| 207 const base::FilePath::CharType* extension, | 209 const base::FilePath::CharType* extension, |
| 208 MediaGalleryScanFileType type) { | 210 MediaGalleryScanFileType type) { |
| 209 base::FilePath::StringType extension_with_sep = | 211 base::FilePath::StringType extension_with_sep = |
| 210 base::FilePath::kExtensionSeparator + | 212 base::FilePath::kExtensionSeparator + |
| 211 base::FilePath::StringType(extension); | 213 base::FilePath::StringType(extension); |
| 212 media_file_extensions_map_[extension_with_sep] |= type; | 214 media_file_extensions_map_[extension_with_sep] |= type; |
| 213 } | 215 } |
| OLD | NEW |