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

Side by Side Diff: content/child/simple_webmimeregistry_impl.cc

Issue 239993009: Revert accidental dartium code push (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months 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 | Annotate | Revision Log
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 "content/child/simple_webmimeregistry_impl.h" 5 #include "content/child/simple_webmimeregistry_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 22 matching lines...) Expand all
33 WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported; 33 WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported;
34 } 34 }
35 35
36 WebMimeRegistry::SupportsType 36 WebMimeRegistry::SupportsType
37 SimpleWebMimeRegistryImpl::supportsJavaScriptMIMEType( 37 SimpleWebMimeRegistryImpl::supportsJavaScriptMIMEType(
38 const WebString& mime_type) { 38 const WebString& mime_type) {
39 return net::IsSupportedJavascriptMimeType(ToASCIIOrEmpty(mime_type)) ? 39 return net::IsSupportedJavascriptMimeType(ToASCIIOrEmpty(mime_type)) ?
40 WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported; 40 WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported;
41 } 41 }
42 42
43 WebMimeRegistry::SupportsType
44 SimpleWebMimeRegistryImpl::supportsDartMIMEType(
45 const WebString& mime_type) {
46 return net::IsSupportedDartMimeType(ToASCIIOrEmpty(mime_type)) ?
47 WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported;
48 }
49
50 // When debugging layout tests failures in the test shell, 43 // When debugging layout tests failures in the test shell,
51 // see TestShellWebMimeRegistryImpl. 44 // see TestShellWebMimeRegistryImpl.
52 WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsMediaMIMEType( 45 WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsMediaMIMEType(
53 const WebString& mime_type, 46 const WebString& mime_type,
54 const WebString& codecs, 47 const WebString& codecs,
55 const WebString& key_system) { 48 const WebString& key_system) {
56 // Media features are only supported at the content/renderer/ layer. 49 // Media features are only supported at the content/renderer/ layer.
57 return IsNotSupported; 50 return IsNotSupported;
58 } 51 }
59 52
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 90
98 WebString SimpleWebMimeRegistryImpl::mimeTypeFromFile( 91 WebString SimpleWebMimeRegistryImpl::mimeTypeFromFile(
99 const WebString& file_path) { 92 const WebString& file_path) {
100 std::string mime_type; 93 std::string mime_type;
101 net::GetMimeTypeFromFile(base::FilePath::FromUTF16Unsafe(file_path), 94 net::GetMimeTypeFromFile(base::FilePath::FromUTF16Unsafe(file_path),
102 &mime_type); 95 &mime_type);
103 return WebString::fromUTF8(mime_type); 96 return WebString::fromUTF8(mime_type);
104 } 97 }
105 98
106 } // namespace content 99 } // namespace content
OLDNEW
« no previous file with comments | « content/child/simple_webmimeregistry_impl.h ('k') | content/shell/common/shell_content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698