OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 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 "net/base/mime_util.h" | 9 #include "net/base/mime_util.h" |
10 #include "webkit/api/public/WebString.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
11 #include "webkit/glue/glue_util.h" | 11 #include "webkit/glue/glue_util.h" |
12 #include "webkit/glue/webkit_glue.h" | 12 #include "webkit/glue/webkit_glue.h" |
13 | 13 |
14 using WebKit::WebString; | 14 using WebKit::WebString; |
15 using WebKit::WebMimeRegistry; | 15 using WebKit::WebMimeRegistry; |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // 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 |
20 // of a non-ASCII string. | 20 // of a non-ASCII string. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 WebString SimpleWebMimeRegistryImpl::preferredExtensionForMIMEType( | 91 WebString SimpleWebMimeRegistryImpl::preferredExtensionForMIMEType( |
92 const WebString& mime_type) { | 92 const WebString& mime_type) { |
93 FilePath::StringType file_extension; | 93 FilePath::StringType file_extension; |
94 net::GetPreferredExtensionForMimeType(AsASCII(mime_type), | 94 net::GetPreferredExtensionForMimeType(AsASCII(mime_type), |
95 &file_extension); | 95 &file_extension); |
96 return FilePathStringToWebString(file_extension); | 96 return FilePathStringToWebString(file_extension); |
97 } | 97 } |
98 | 98 |
99 } // namespace webkit_glue | 99 } // namespace webkit_glue |
OLD | NEW |