From f0bc50e546b3beacc7d497da284bb1cda9c26901 Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Thu, 10 Mar 2011 00:31:19 +0000 Subject: web databases: remove a ToWStringHack BUG=69467 Review URL: http://codereview.chromium.org/6646028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77560 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/database/database_util.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'webkit/database') diff --git a/webkit/database/database_util.cc b/webkit/database/database_util.cc index 2886095..85a1143 100644 --- a/webkit/database/database_util.cc +++ b/webkit/database/database_util.cc @@ -56,8 +56,9 @@ FilePath DatabaseUtil::GetFullFilePathForVfsFile( FilePath full_path = db_tracker->GetFullDBFilePath( origin_identifier, database_name); if (!full_path.empty() && !sqlite_suffix.empty()) { - full_path = FilePath::FromWStringHack( - full_path.ToWStringHack() + UTF16ToWide(sqlite_suffix)); + DCHECK(full_path.Extension().empty()); + full_path = full_path.InsertBeforeExtensionASCII( + UTF16ToASCII(sqlite_suffix)); } // Watch out for directory traversal attempts from a compromised renderer. if (full_path.value().find(FILE_PATH_LITERAL("..")) != -- cgit v1.1