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

Side by Side Diff: webkit/database/database_tracker.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "webkit/database/database_tracker.h" 5 #include "webkit/database/database_tracker.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/sql/connection.h" 10 #include "app/sql/connection.h"
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 file_util::Delete(db_dir, true); 712 file_util::Delete(db_dir, true);
713 return; 713 return;
714 } 714 }
715 } 715 }
716 } 716 }
717 file_util::FileEnumerator file_enumerator(db_dir, false, 717 file_util::FileEnumerator file_enumerator(db_dir, false,
718 file_util::FileEnumerator::DIRECTORIES); 718 file_util::FileEnumerator::DIRECTORIES);
719 for (FilePath file_path = file_enumerator.Next(); !file_path.empty(); 719 for (FilePath file_path = file_enumerator.Next(); !file_path.empty();
720 file_path = file_enumerator.Next()) { 720 file_path = file_enumerator.Next()) {
721 if (file_path.BaseName() != FilePath(kTrackerDatabaseFileName)) { 721 if (file_path.BaseName() != FilePath(kTrackerDatabaseFileName)) {
722 if (!StartsWith(file_path.BaseName().ToWStringHack(), 722 if (!StartsWith(file_path.BaseName().LossyDisplayName(),
723 ASCIIToWide(kExtensionOriginIdentifierPrefix), true)) 723 ASCIIToUTF16(kExtensionOriginIdentifierPrefix), true)) {
Avi (use Gerrit) 2011/02/01 22:46:25 Another one I'm not thrilled with.
724 file_util::Delete(file_path, true); 724 file_util::Delete(file_path, true);
725 }
725 } 726 }
726 } 727 }
727 } 728 }
728 729
729 } // namespace webkit_database 730 } // namespace webkit_database
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698