| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/glue/simple_webmimeregistry_impl.h" | 5 #include "webkit/glue/simple_webmimeregistry_impl.h" |
| 6 | 6 |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "media/filters/stream_parser_factory.h" | 10 #include "media/filters/stream_parser_factory.h" |
| 11 #include "net/base/mime_util.h" | 11 #include "net/base/mime_util.h" |
| 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 12 #include "third_party/WebKit/public/platform/WebString.h" |
| 13 #include "webkit/base/file_path_string_conversions.h" | 13 #include "webkit/base/file_path_string_conversions.h" |
| 14 #include "webkit/media/crypto/key_systems.h" | 14 #include "webkit/media/crypto/key_systems.h" |
| 15 | 15 |
| 16 using WebKit::WebString; | 16 using WebKit::WebString; |
| 17 using WebKit::WebMimeRegistry; | 17 using WebKit::WebMimeRegistry; |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // Convert a WebString to ASCII, falling back on an empty string in the case | 21 // Convert a WebString to ASCII, falling back on an empty string in the case |
| 22 // of a non-ASCII string. | 22 // of a non-ASCII string. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 WebString SimpleWebMimeRegistryImpl::preferredExtensionForMIMEType( | 153 WebString SimpleWebMimeRegistryImpl::preferredExtensionForMIMEType( |
| 154 const WebString& mime_type) { | 154 const WebString& mime_type) { |
| 155 base::FilePath::StringType file_extension; | 155 base::FilePath::StringType file_extension; |
| 156 net::GetPreferredExtensionForMimeType(ToASCIIOrEmpty(mime_type), | 156 net::GetPreferredExtensionForMimeType(ToASCIIOrEmpty(mime_type), |
| 157 &file_extension); | 157 &file_extension); |
| 158 return webkit_base::FilePathStringToWebString(file_extension); | 158 return webkit_base::FilePathStringToWebString(file_extension); |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace webkit_glue | 161 } // namespace webkit_glue |
| OLD | NEW |