Searched refs:mime_type (Results 1 - 25 of 30) sorted by relevance

12

/external/chromium-trace/catapult/third_party/Paste/paste/util/
H A Dmimeparse.py24 def parse_mime_type(mime_type):
33 type = mime_type.split(';')
72 def fitness_and_quality_parsed(mime_type, parsed_ranges):
81 target_type, target_subtype, target_params = parse_media_range(mime_type)
101 def quality_parsed(mime_type, parsed_ranges):
109 return fitness_and_quality_parsed(mime_type, parsed_ranges)[1]
111 def quality(mime_type, ranges):
120 return quality_parsed(mime_type, parsed_ranges)
137 (fitness_and_quality_parsed(mime_type, parsed_header), -n)
138 for n, mime_type i
[all...]
/external/chromium-trace/catapult/third_party/apiclient/googleapiclient/
H A Dmimeparse.py35 def parse_mime_type(mime_type):
45 parts = mime_type.split(';')
82 def fitness_and_quality_parsed(mime_type, parsed_ranges):
94 parse_media_range(mime_type)
116 def quality_parsed(mime_type, parsed_ranges):
126 return fitness_and_quality_parsed(mime_type, parsed_ranges)[1]
129 def quality(mime_type, ranges):
142 return quality_parsed(mime_type, parsed_ranges)
163 for mime_type in supported:
164 weighted_matches.append((fitness_and_quality_parsed(mime_type,
[all...]
/external/chromium-trace/catapult/third_party/gsutil/third_party/boto/boto/services/
H A Dmessage.py36 mime_type = mimetypes.guess_type(t[1])[0]
37 if mime_type is None:
38 mime_type = 'application/octet-stream'
39 self['Content-Type'] = mime_type
/external/chromium-trace/catapult/tracing/tracing_build/
H A Dtrace2html.py56 def __init__(self, trace_data_string, mime_type):
59 self._mime_type = mime_type
96 mime_type = 'application/json'
98 mime_type = 'text/plain'
99 scripts.append(ViewerDataScript(trace_data, mime_type))
/external/libbrillo/brillo/http/
H A Dhttp_utils.cc66 const std::string& mime_type,
71 url, data.data(), data.size(), mime_type, headers, transport, error);
76 const std::string& mime_type,
84 mime_type,
96 const std::string& mime_type,
103 CHECK(!mime_type.empty()) << "MIME type must be specified if request body "
105 request.SetContentType(mime_type);
125 const std::string& mime_type,
133 CHECK(!mime_type.empty()) << "MIME type must be specified if request body "
135 request.SetContentType(mime_type);
64 PostTextAndBlock(const std::string& url, const std::string& data, const std::string& mime_type, const HeaderList& headers, std::shared_ptr<Transport> transport, brillo::ErrorPtr* error) argument
74 PostText(const std::string& url, const std::string& data, const std::string& mime_type, const HeaderList& headers, std::shared_ptr<Transport> transport, const SuccessCallback& success_callback, const ErrorCallback& error_callback) argument
91 SendRequestAndBlock( const std::string& method, const std::string& url, const void* data, size_t data_size, const std::string& mime_type, const HeaderList& headers, std::shared_ptr<Transport> transport, brillo::ErrorPtr* error) argument
122 SendRequest(const std::string& method, const std::string& url, StreamPtr stream, const std::string& mime_type, const HeaderList& headers, std::shared_ptr<Transport> transport, const SuccessCallback& success_callback, const ErrorCallback& error_callback) argument
147 SendRequest(const std::string& method, const std::string& url, const void* data, size_t data_size, const std::string& mime_type, const HeaderList& headers, std::shared_ptr<Transport> transport, const SuccessCallback& success_callback, const ErrorCallback& error_callback) argument
182 PostBinaryAndBlock( const std::string& url, const void* data, size_t data_size, const std::string& mime_type, const HeaderList& headers, std::shared_ptr<Transport> transport, brillo::ErrorPtr* error) argument
200 PostBinary(const std::string& url, StreamPtr stream, const std::string& mime_type, const HeaderList& headers, std::shared_ptr<Transport> transport, const SuccessCallback& success_callback, const ErrorCallback& error_callback) argument
217 PostBinary(const std::string& url, const void* data, size_t data_size, const std::string& mime_type, const HeaderList& headers, std::shared_ptr<Transport> transport, const SuccessCallback& success_callback, const ErrorCallback& error_callback) argument
307 std::string mime_type = AppendParameter(brillo::mime::application::kJson, local
323 std::string mime_type = AppendParameter(brillo::mime::application::kJson, local
345 std::string mime_type = AppendParameter(brillo::mime::application::kJson, local
367 std::string mime_type = local
[all...]
H A Dhttp_transport_fake.cc123 const std::string& mime_type) {
124 auto handler = [status_code, reply_text, mime_type](
126 response->ReplyText(status_code, reply_text, mime_type);
225 std::string mime_type = brillo::mime::RemoveParameters( local
227 if (mime_type == brillo::mime::application::kWwwFormUrlEncoded &&
241 const std::string& mime_type) {
247 {response_header::kContentType, mime_type}});
252 const std::string& mime_type) {
253 Reply(status_code, text.data(), text.size(), mime_type);
260 std::string mime_type local
119 AddSimpleReplyHandler(const std::string& url, const std::string& method, int status_code, const std::string& reply_text, const std::string& mime_type) argument
238 Reply(int status_code, const void* data, size_t data_size, const std::string& mime_type) argument
250 ReplyText(int status_code, const std::string& text, const std::string& mime_type) argument
[all...]
H A Dhttp_utils.h61 const std::string& mime_type,
84 const std::string& mime_type,
100 const std::string& mime_type,
160 const std::string& mime_type,
171 const std::string& mime_type,
186 const std::string& mime_type,
198 const std::string& mime_type,
209 const std::string& mime_type,
H A Dhttp_transport_fake.h58 const std::string& mime_type);
204 const std::string& mime_type);
208 const std::string& mime_type);
221 const std::string& mime_type) {
224 Reply(status_code, data.data(), data.size() * sizeof(T), mime_type);
230 void Reply(int status_code, const T& data, const std::string& mime_type) { argument
233 Reply(status_code, &data, sizeof(T), mime_type);
219 Reply(int status_code, const std::vector<T>& data, const std::string& mime_type) argument
H A Dhttp_utils_unittest.cc374 auto mime_type = brillo::mime::RemoveParameters(
376 EXPECT_EQ(brillo::mime::application::kJson, mime_type);
/external/chromium-trace/catapult/third_party/gsutil/third_party/apitools/apitools/base/py/
H A Dutil.py142 def AcceptableMimeType(accept_patterns, mime_type):
143 """Return True iff mime_type is acceptable for one of accept_patterns.
152 mime_type: the mime type we would like to match.
155 Whether or not mime_type matches (at least) one of these patterns.
157 if '/' not in mime_type:
159 'Invalid MIME type: "%s"' % mime_type)
166 def MimeTypeMatches(pattern, mime_type):
167 """Return True iff mime_type is acceptable for pattern."""
172 in zip(pattern.split('/'), mime_type.split('/')))
174 return any(MimeTypeMatches(pattern, mime_type)
[all...]
H A Dutil_test.py136 for accept, mime_type in valid_pairs:
137 self.assertTrue(util.AcceptableMimeType([accept], mime_type))
144 for accept, mime_type in invalid_pairs:
145 self.assertFalse(util.AcceptableMimeType([accept], mime_type))
H A Dtransfer.py524 mime_type: MIME type of the upload.
532 'auto_transfer', 'mime_type', 'total_size', 'url'))
534 def __init__(self, stream, mime_type, total_size=None, http=None,
543 self.__mime_type = mime_type
558 def FromFile(cls, filename, mime_type=None, auto_transfer=True, **kwds):
563 if not mime_type:
564 mime_type, _ = mimetypes.guess_type(path)
565 if mime_type is None:
569 return cls(open(path, 'rb'), mime_type, total_size=size,
573 def FromStream(cls, stream, mime_type, total_siz
630 def mime_type(self): member in class:Upload
[all...]
/external/owasp/sanitizer/tools/
H A Dcut_release.py113 mime_type = mime_type_from_path(dest_path)
114 if mime_type is None or mime_type.startswith("text/"):
177 mime_type = mime_type_from_path(new_file_path)
178 if mime_type is not None:
179 print "svn propset svn:mime-type '%s' '%s'" % (mime_type, new_file_path)
H A Dupdate_tree_in_svn.py83 mime_type = MIME_TYPES_BY_EXTENSION.get(dst[dot+1:])
84 if mime_type is not None:
85 key = ('svn:mime-type', mime_type)
/external/autotest/frontend/afe/feeds/
H A Dfeed.py34 response = HttpResponse(mimetype=feedgen.mime_type)
/external/libweave/examples/provider/
H A Devent_http_server.h48 const std::string& mime_type);
H A Devent_http_server.cc54 const std::string& mime_type) override {
58 evhtp_header_val_add(req_->headers_out, mime_type.c_str(), 1);
172 const std::string& mime_type) {}
169 ProcessReply(std::shared_ptr<RequestImpl> request, int status_code, const std::string& data, const std::string& mime_type) argument
/external/libweave/include/weave/provider/
H A Dhttp_server.h86 // mime_type - MIME type of the response, that should be transferred into
120 const std::string& mime_type) = 0;
/external/opencv3/3rdparty/include/ffmpeg_/libavformat/
H A Davformat.h394 const char *mime_type; member in struct:AVOutputFormat
1863 * @param mime_type if non-NULL checks if mime_type matches with the
1868 const char *mime_type);
1874 const char *filename, const char *mime_type,
/external/flac/include/FLAC/
H A Dmetadata.h213 * \param mime_type The desired MIME type, e.g. "image/jpeg". The
237 FLAC_API FLAC__bool FLAC__metadata_get_picture(const char *filename, FLAC__StreamMetadata **picture, FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors);
2094 * \note It is safe to pass a const pointer to \a mime_type if \a copy is \c true.
2097 * \param mime_type A pointer to the MIME type string. The string must be
2104 * \code (mime_type != NULL) \endcode
2108 FLAC_API FLAC__bool FLAC__metadata_object_picture_set_mime_type(FLAC__StreamMetadata *object, char *mime_type, FLAC__bool copy);
H A Dformat.h773 char *mime_type; member in struct:__anon5943
/external/flac/libFLAC/
H A Dstream_encoder_framing.c181 len = strlen(metadata->data.picture.mime_type);
184 if(!FLAC__bitwriter_write_byte_block(bw, (const FLAC__byte*)metadata->data.picture.mime_type, len))
H A Dformat.c496 for(p = picture->mime_type; *p; p++) {
/external/chromium-trace/catapult/third_party/WebOb/webob/
H A Drequest.py1646 mime_type = mimetypes.guess_type(filename)[0]
1648 mime_type = None
1659 elif mime_type:
1660 wt('Content-type: %s' % mime_type)
/external/libweave/src/
H A Ddevice_registration_info.cc154 void SetData(const std::string& data, const std::string& mime_type) { argument
156 mime_type_ = mime_type;

Completed in 483 milliseconds

12