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

Side by Side Diff: webkit/tools/test_shell/test_shell.cc

Issue 6246036: FilePath: Remove most of ToWStringHack, adding a LossyDisplayName() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 (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
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
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
OLDNEW
« webkit/database/database_tracker.cc ('K') | « webkit/support/webkit_support.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698