summaryrefslogtreecommitdiffstats
path: root/components/mime_util/mime_util.h
blob: bea3c5371d68df59cc0df2c195bc30ce47806d3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_MIME_UTIL_MIME_UTIL_H__
#define COMPONENTS_MIME_UTIL_MIME_UTIL_H__

#include <string>

#include "net/base/mime_util.h"

namespace mime_util {

// Check to see if a particular MIME type is in the list of
// supported/recognized MIME types.
bool IsSupportedImageMimeType(const std::string& mime_type);
bool IsSupportedNonImageMimeType(const std::string& mime_type);
bool IsUnsupportedTextMimeType(const std::string& mime_type);
bool IsSupportedJavascriptMimeType(const std::string& mime_type);
bool IsSupportedCertificateMimeType(const std::string& mime_type);

// Convenience function.
bool IsSupportedMimeType(const std::string& mime_type);

net::CertificateMimeType GetCertificateMimeTypeForMimeType(
    const std::string& mime_type);

}  // namespace mime_util

#endif  // COMPONENTS_MIME_UTIL_MIME_UTIL_H__