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

Side by Side Diff: components/html_viewer/web_mime_registry_impl.cc

Issue 1476763004: Remove unused code from WebMimeRegistry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove implementations 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/html_viewer/web_mime_registry_impl.h" 5 #include "components/html_viewer/web_mime_registry_impl.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 blink::WebString WebMimeRegistryImpl::wellKnownMimeTypeForExtension( 112 blink::WebString WebMimeRegistryImpl::wellKnownMimeTypeForExtension(
113 const blink::WebString& file_extension) { 113 const blink::WebString& file_extension) {
114 std::string mime_type; 114 std::string mime_type;
115 net::GetWellKnownMimeTypeFromExtension( 115 net::GetWellKnownMimeTypeFromExtension(
116 base::FilePath::FromUTF16Unsafe(file_extension).value(), &mime_type); 116 base::FilePath::FromUTF16Unsafe(file_extension).value(), &mime_type);
117 return blink::WebString::fromUTF8(mime_type); 117 return blink::WebString::fromUTF8(mime_type);
118 } 118 }
119 119
120 blink::WebString WebMimeRegistryImpl::mimeTypeFromFile(
121 const blink::WebString& file_path) {
122 std::string mime_type;
123 net::GetMimeTypeFromFile(base::FilePath::FromUTF16Unsafe(file_path),
124 &mime_type);
125 return blink::WebString::fromUTF8(mime_type);
126 }
127
128 } // namespace html_viewer 120 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/web_mime_registry_impl.h ('k') | content/browser/mime_registry_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698