OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // 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/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
| 9 #include "base/utf_string_conversions.h" |
9 #include "net/base/mime_util.h" | 10 #include "net/base/mime_util.h" |
10 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" | 11 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
11 #include "webkit/glue/webkit_glue.h" | 12 #include "webkit/glue/webkit_glue.h" |
12 | 13 |
13 using WebKit::WebString; | 14 using WebKit::WebString; |
14 using WebKit::WebMimeRegistry; | 15 using WebKit::WebMimeRegistry; |
15 | 16 |
16 namespace { | 17 namespace { |
17 | 18 |
18 // Convert a WebString to ASCII, falling back on an empty string in the case | 19 // Convert a WebString to ASCII, falling back on an empty string in the case |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 109 |
109 WebString SimpleWebMimeRegistryImpl::preferredExtensionForMIMEType( | 110 WebString SimpleWebMimeRegistryImpl::preferredExtensionForMIMEType( |
110 const WebString& mime_type) { | 111 const WebString& mime_type) { |
111 FilePath::StringType file_extension; | 112 FilePath::StringType file_extension; |
112 net::GetPreferredExtensionForMimeType(ToASCIIOrEmpty(mime_type), | 113 net::GetPreferredExtensionForMimeType(ToASCIIOrEmpty(mime_type), |
113 &file_extension); | 114 &file_extension); |
114 return FilePathStringToWebString(file_extension); | 115 return FilePathStringToWebString(file_extension); |
115 } | 116 } |
116 | 117 |
117 } // namespace webkit_glue | 118 } // namespace webkit_glue |
OLD | NEW |