Home
last modified time | relevance | path

Searched refs:mime_string (Results 1 – 3 of 3) sorted by relevance

/external/libbrillo/brillo/
Dmime_utils_test.cc12 std::string mime_string = mime::Combine(mime::types::kText, "xml"); in TEST() local
13 EXPECT_EQ(mime::text::kXml, mime_string); in TEST()
53 std::string mime_string = mime::AppendParameter( in TEST() local
55 EXPECT_EQ("text/xml; charset=utf-8", mime_string); in TEST()
56 mime_string = mime::AppendParameter(mime_string, "foo", "bar"); in TEST()
57 EXPECT_EQ("text/xml; charset=utf-8; foo=bar", mime_string); in TEST()
59 mime::GetParameterValue(mime_string, mime::parameters::kCharset)); in TEST()
60 EXPECT_EQ("bar", mime::GetParameterValue(mime_string, "foo")); in TEST()
61 EXPECT_EQ("", mime::GetParameterValue(mime_string, "baz")); in TEST()
62 mime_string = mime::RemoveParameters(mime_string); in TEST()
[all …]
Dmime_utils.cc68 bool mime::Split(const std::string& mime_string, in Split() argument
73 brillo::string_utils::Split(mime_string, ";"); in Split()
92 bool mime::Split(const std::string& mime_string, in Split() argument
95 std::string mime = mime::RemoveParameters(mime_string); in Split()
119 std::string mime::GetType(const std::string& mime_string) { in GetType() argument
120 std::string mime = mime::RemoveParameters(mime_string); in GetType()
124 std::string mime::GetSubtype(const std::string& mime_string) { in GetSubtype() argument
125 std::string mime = mime::RemoveParameters(mime_string); in GetSubtype()
129 mime::Parameters mime::GetParameters(const std::string& mime_string) { in GetParameters() argument
134 if (mime::Split(mime_string, &type, &subtype, &parameters)) in GetParameters()
[all …]
Dmime_utils.h83 BRILLO_EXPORT bool Split(const std::string& mime_string,
89 BRILLO_EXPORT bool Split(const std::string& mime_string,
96 BRILLO_EXPORT std::string GetType(const std::string& mime_string);
100 BRILLO_EXPORT std::string GetSubtype(const std::string& mime_string);
104 BRILLO_EXPORT Parameters GetParameters(const std::string& mime_string);
109 const std::string& mime_string) WARN_UNUSED_RESULT;
114 const std::string& mime_string,
120 BRILLO_EXPORT std::string GetParameterValue(const std::string& mime_string,