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

Side by Side Diff: chrome/browser/media_galleries/fileapi/media_path_filter.cc

Issue 15875004: Add more RAW picture formats to the media galleries extension filter. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: add phase one raw files Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/base/mime_sniffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "net/base/mime_util.h" 11 #include "net/base/mime_util.h"
12 12
13 namespace chrome { 13 namespace chrome {
14 14
15 namespace { 15 namespace {
16 16
17 const base::FilePath::CharType* const kExtraSupportedExtensions[] = { 17 const base::FilePath::CharType* const kExtraSupportedExtensions[] = {
18 // RAW Picture file types. 18 // RAW picture file types.
19 // Some of which are just image/tiff. 19 // Some of which are just image/tiff.
20 FILE_PATH_LITERAL("3fr"), // (Hasselblad) 20 FILE_PATH_LITERAL("3fr"), // (Hasselblad)
21 FILE_PATH_LITERAL("arw"), // (Sony) 21 FILE_PATH_LITERAL("arw"), // (Sony)
22 FILE_PATH_LITERAL("dcr"), // (Kodak)
22 FILE_PATH_LITERAL("dng"), // (Adobe, Leica, Ricoh, Samsung) 23 FILE_PATH_LITERAL("dng"), // (Adobe, Leica, Ricoh, Samsung)
24 FILE_PATH_LITERAL("erf"), // (Epson)
25 FILE_PATH_LITERAL("k25"), // (Kodak)
26 FILE_PATH_LITERAL("kdc"), // (Kodak)
23 FILE_PATH_LITERAL("mef"), // (Mamiya) 27 FILE_PATH_LITERAL("mef"), // (Mamiya)
28 FILE_PATH_LITERAL("mos"), // (Leaf)
24 FILE_PATH_LITERAL("nef"), // (Nikon) 29 FILE_PATH_LITERAL("nef"), // (Nikon)
25 FILE_PATH_LITERAL("pef"), // (Pentax) 30 FILE_PATH_LITERAL("pef"), // (Pentax)
26 FILE_PATH_LITERAL("sr2"), // (Sony) 31 FILE_PATH_LITERAL("sr2"), // (Sony)
27 FILE_PATH_LITERAL("srf"), // (Sony) 32 FILE_PATH_LITERAL("srf"), // (Sony)
28 33
34 // More RAW picture file types.
35 FILE_PATH_LITERAL("cr2"), // (Canon - image/x-canon-cr2)
36 // Note, some .crw files are just TIFFs.
37 FILE_PATH_LITERAL("crw"), // (Canon - image/x-canon-crw)
38 FILE_PATH_LITERAL("mrw"), // (Minolta - image/x-minolta-mrw)
39 FILE_PATH_LITERAL("orf"), // (Olympus - image/x-olympus-orf)
40 FILE_PATH_LITERAL("raf"), // (Fuji)
41 FILE_PATH_LITERAL("rw2"), // (Panasonic - image/x-panasonic-raw)
42 FILE_PATH_LITERAL("x3f"), // (Sigma - image/x-x3f)
43
44 // There exists many file formats all with the .raw extension. For now, only
45 // the following types are supported:
46 // - TIFF files with .raw extension - image/tiff
47 // - Leica / Panasonic RAW files - image/x-panasonic-raw
48 // - Phase One RAW files - image/x-phaseone-raw
49 FILE_PATH_LITERAL("raw"),
50
29 // Video files types. 51 // Video files types.
30 FILE_PATH_LITERAL("3gp"), 52 FILE_PATH_LITERAL("3gp"),
31 FILE_PATH_LITERAL("3gpp"), 53 FILE_PATH_LITERAL("3gpp"),
32 FILE_PATH_LITERAL("avi"), 54 FILE_PATH_LITERAL("avi"),
33 FILE_PATH_LITERAL("flv"), 55 FILE_PATH_LITERAL("flv"),
34 FILE_PATH_LITERAL("mov"), 56 FILE_PATH_LITERAL("mov"),
35 FILE_PATH_LITERAL("mpeg"), 57 FILE_PATH_LITERAL("mpeg"),
36 FILE_PATH_LITERAL("mpeg4"), 58 FILE_PATH_LITERAL("mpeg4"),
37 FILE_PATH_LITERAL("mpegps"), 59 FILE_PATH_LITERAL("mpegps"),
38 FILE_PATH_LITERAL("mpg"), 60 FILE_PATH_LITERAL("mpg"),
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 107
86 for (MediaFileExtensionList::iterator itr = media_file_extensions_.begin(); 108 for (MediaFileExtensionList::iterator itr = media_file_extensions_.begin();
87 itr != media_file_extensions_.end(); ++itr) 109 itr != media_file_extensions_.end(); ++itr)
88 *itr = base::FilePath::kExtensionSeparator + *itr; 110 *itr = base::FilePath::kExtensionSeparator + *itr;
89 std::sort(media_file_extensions_.begin(), media_file_extensions_.end()); 111 std::sort(media_file_extensions_.begin(), media_file_extensions_.end());
90 112
91 initialized_ = true; 113 initialized_ = true;
92 } 114 }
93 115
94 } // namespace chrome 116 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | net/base/mime_sniffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698