diff options
Diffstat (limited to 'webkit/database/database_tracker.cc')
-rw-r--r-- | webkit/database/database_tracker.cc | 6 |
1 files changed, 4 insertions, 2 deletions
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); + } } } } |