OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/tools/test_shell/test_shell_webmimeregistry_impl.h" | 5 #include "webkit/tools/test_shell/test_shell_webmimeregistry_impl.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "net/base/mime_util.h" | 8 #include "net/base/mime_util.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
10 | 10 |
11 using WebKit::WebString; | 11 using WebKit::WebString; |
12 using WebKit::WebMimeRegistry; | 12 using WebKit::WebMimeRegistry; |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // Convert a WebString to ASCII, falling back on an empty string in the case | 16 // Convert a WebString to ASCII, falling back on an empty string in the case |
17 // of a non-ASCII string. | 17 // of a non-ASCII string. |
18 std::string ToASCIIOrEmpty(const WebString& string) { | 18 std::string ToASCIIOrEmpty(const WebString& string) { |
19 if (!IsStringASCII(string)) | 19 if (!IsStringASCII(string)) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 bool TestShellWebMimeRegistryImpl::AreSupportedMediaCodecs( | 64 bool TestShellWebMimeRegistryImpl::AreSupportedMediaCodecs( |
65 const std::vector<std::string>& codecs) { | 65 const std::vector<std::string>& codecs) { |
66 for (size_t i = 0; i < codecs.size(); ++i) { | 66 for (size_t i = 0; i < codecs.size(); ++i) { |
67 if (codecs_map_.find(codecs[i]) == codecs_map_.end()) { | 67 if (codecs_map_.find(codecs[i]) == codecs_map_.end()) { |
68 return false; | 68 return false; |
69 } | 69 } |
70 } | 70 } |
71 return true; | 71 return true; |
72 } | 72 } |
OLD | NEW |