Chromium Code Reviews

Side by Side Diff: base/mime_util.h

Issue 113168: Add xdg mime support on Linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « base/base.gyp ('k') | base/mime_util_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_MIME_UTIL_H_
6 #define BASE_MIME_UTIL_H_
7
8 #include <string>
9
10 class FilePath;
11
12 namespace mime_util {
13
14 // Gets the mime type for a file based on its filename. The file path does not
15 // have to exist. Please note because it doesn't touch the disk, this does not
16 // work for directories.
17 // If the mime type is unknown, this will return application/octet-stream.
18 std::string GetFileMimeType(const std::string& file_path);
19
20 // Gets the file name for an icon given the mime type and icon pixel size.
21 // Where an icon is a square image of |size| x |size|.
22 // This will try to find the closest matching icon. If that's not available,
23 // then a generic icon, and finally an empty FilePath if all else fails.
24 FilePath GetMimeIcon(const std::string& mime_type, size_t size);
25
26 } // namespace mime_util
27
28 #endif // BASE_MIME_UTIL_H_
OLDNEW
« no previous file with comments | « base/base.gyp ('k') | base/mime_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine