From 967d18bad65a0dc0cf8d0207cbd2cf82651752b8 Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Wed, 2 Mar 2011 22:22:07 +0000 Subject: wstring: remove some simple instances of ToWStringHack BUG=69467 Review URL: http://codereview.chromium.org/6588131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76630 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/database/database_tracker.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'webkit/database') diff --git a/webkit/database/database_tracker.cc b/webkit/database/database_tracker.cc index 20f5971..5911ad2 100644 --- a/webkit/database/database_tracker.cc +++ b/webkit/database/database_tracker.cc @@ -715,9 +715,11 @@ void DatabaseTracker::ClearLocalState(const FilePath& profile_path) { for (FilePath file_path = file_enumerator.Next(); !file_path.empty(); file_path = file_enumerator.Next()) { if (file_path.BaseName() != FilePath(kTrackerDatabaseFileName)) { - if (!StartsWith(file_path.BaseName().ToWStringHack(), - ASCIIToWide(kExtensionOriginIdentifierPrefix), true)) + std::string basename = file_path.BaseName().MaybeAsASCII(); + if (!basename.empty() && + !StartsWithASCII(basename, kExtensionOriginIdentifierPrefix, true)) { file_util::Delete(file_path, true); + } } } } -- cgit v1.1