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

Side by Side Diff: Source/platform/MIMETypeRegistry.cpp

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years 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
« no previous file with comments | « Source/platform/MIMETypeRegistry.h ('k') | Source/wtf/ArrayBuffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 return true; 91 return true;
92 return false; 92 return false;
93 } 93 }
94 94
95 bool MIMETypeRegistry::isSupportedJavaScriptMIMEType(const String& mimeType) 95 bool MIMETypeRegistry::isSupportedJavaScriptMIMEType(const String& mimeType)
96 { 96 {
97 return Platform::current()->mimeRegistry()->supportsJavaScriptMIMEType(mimeT ype.lower()) 97 return Platform::current()->mimeRegistry()->supportsJavaScriptMIMEType(mimeT ype.lower())
98 != WebMimeRegistry::IsNotSupported; 98 != WebMimeRegistry::IsNotSupported;
99 } 99 }
100 100
101 bool MIMETypeRegistry::isSupportedDartMIMEType(const String& mimeType)
102 {
103 return blink::Platform::current()->mimeRegistry()->supportsDartMIMEType(mime Type)
104 != blink::WebMimeRegistry::IsNotSupported;
105 }
106
101 bool MIMETypeRegistry::isSupportedNonImageMIMEType(const String& mimeType) 107 bool MIMETypeRegistry::isSupportedNonImageMIMEType(const String& mimeType)
102 { 108 {
103 return Platform::current()->mimeRegistry()->supportsNonImageMIMEType(mimeTyp e.lower()) 109 return Platform::current()->mimeRegistry()->supportsNonImageMIMEType(mimeTyp e.lower())
104 != WebMimeRegistry::IsNotSupported; 110 != WebMimeRegistry::IsNotSupported;
105 } 111 }
106 112
107 bool MIMETypeRegistry::isSupportedMediaSourceMIMEType(const String& mimeType, co nst String& codecs) 113 bool MIMETypeRegistry::isSupportedMediaSourceMIMEType(const String& mimeType, co nst String& codecs)
108 { 114 {
109 return !mimeType.isEmpty() 115 return !mimeType.isEmpty()
110 && Platform::current()->mimeRegistry()->supportsMediaSourceMIMEType(mime Type.lower(), codecs); 116 && Platform::current()->mimeRegistry()->supportsMediaSourceMIMEType(mime Type.lower(), codecs);
111 } 117 }
112 118
113 bool MIMETypeRegistry::isJavaAppletMIMEType(const String& mimeType) 119 bool MIMETypeRegistry::isJavaAppletMIMEType(const String& mimeType)
114 { 120 {
115 // Since this set is very limited and is likely to remain so we won't bother with the overhead 121 // Since this set is very limited and is likely to remain so we won't bother with the overhead
116 // of using a hash set. 122 // of using a hash set.
117 // Any of the MIME types below may be followed by any number of specific ver sions of the JVM, 123 // Any of the MIME types below may be followed by any number of specific ver sions of the JVM,
118 // which is why we use startsWith() 124 // which is why we use startsWith()
119 return mimeType.startsWith("application/x-java-applet", TextCaseInsensitive) 125 return mimeType.startsWith("application/x-java-applet", TextCaseInsensitive)
120 || mimeType.startsWith("application/x-java-bean", TextCaseInsensitive) 126 || mimeType.startsWith("application/x-java-bean", TextCaseInsensitive)
121 || mimeType.startsWith("application/x-java-vm", TextCaseInsensitive); 127 || mimeType.startsWith("application/x-java-vm", TextCaseInsensitive);
122 } 128 }
123 129
124 } // namespace blink 130 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/MIMETypeRegistry.h ('k') | Source/wtf/ArrayBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698