OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #undef LOG | 5 #undef LOG |
6 | 6 |
7 #include "webkit/tools/test_shell/test_shell.h" | 7 #include "webkit/tools/test_shell/test_shell.h" |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 } | 809 } |
810 | 810 |
811 bool GetPluginFinderURL(std::string* plugin_finder_url) { | 811 bool GetPluginFinderURL(std::string* plugin_finder_url) { |
812 return false; | 812 return false; |
813 } | 813 } |
814 | 814 |
815 bool IsDefaultPluginEnabled() { | 815 bool IsDefaultPluginEnabled() { |
816 FilePath exe_path; | 816 FilePath exe_path; |
817 | 817 |
818 if (PathService::Get(base::FILE_EXE, &exe_path)) { | 818 if (PathService::Get(base::FILE_EXE, &exe_path)) { |
819 std::wstring exe_name = exe_path.BaseName().ToWStringHack(); | 819 std::string exe_name = |
820 if (StartsWith(exe_name, L"test_shell_tests", false)) | 820 UTF16ToASCII(exe_path.BaseName().LossyDisplayName())); |
| 821 if (StartsWith(exe_name, "test_shell_tests", false)) |
821 return true; | 822 return true; |
822 } | 823 } |
823 return false; | 824 return false; |
824 } | 825 } |
825 | 826 |
826 bool IsProtocolSupportedForMedia(const GURL& url) { | 827 bool IsProtocolSupportedForMedia(const GURL& url) { |
827 if (url.SchemeIsFile() || | 828 if (url.SchemeIsFile() || |
828 url.SchemeIs("http") || | 829 url.SchemeIs("http") || |
829 url.SchemeIs("https") || | 830 url.SchemeIs("https") || |
830 url.SchemeIs("data")) | 831 url.SchemeIs("data")) |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { | 896 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { |
896 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { | 897 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { |
897 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); | 898 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); |
898 plugins->erase(plugins->begin() + i); | 899 plugins->erase(plugins->begin() + i); |
899 } | 900 } |
900 } | 901 } |
901 } | 902 } |
902 } | 903 } |
903 | 904 |
904 } // namespace webkit_glue | 905 } // namespace webkit_glue |
OLD | NEW |