summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history
diff options
context:
space:
mode:
authoravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-11 14:55:12 +0000
committeravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-11 14:55:12 +0000
commit0b733220c5fbef986647fce040c1b5d5e48be2b6 (patch)
tree72caaec198bd07c1e468c2a4805b00067da78126 /chrome/browser/history
parent64596e5e583f0c64124da1a79e496d6e063c25fa (diff)
downloadchromium_src-0b733220c5fbef986647fce040c1b5d5e48be2b6.zip
chromium_src-0b733220c5fbef986647fce040c1b5d5e48be2b6.tar.gz
chromium_src-0b733220c5fbef986647fce040c1b5d5e48be2b6.tar.bz2
Move file enumeration to filepaths.
Review URL: http://codereview.chromium.org/13315 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6784 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history')
-rw-r--r--chrome/browser/history/text_database_manager.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/history/text_database_manager.cc b/chrome/browser/history/text_database_manager.cc
index ed280fe..12ba716 100644
--- a/chrome/browser/history/text_database_manager.cc
+++ b/chrome/browser/history/text_database_manager.cc
@@ -147,11 +147,12 @@ void TextDatabaseManager::InitDBList() {
present_databases_loaded_ = true;
// Find files on disk matching our pattern so we can quickly test for them.
- file_util::FileEnumerator enumerator(dir_, false,
+ file_util::FileEnumerator enumerator(FilePath::FromWStringHack(dir_), false,
file_util::FileEnumerator::FILES,
- std::wstring(TextDatabase::file_base()) + L"*");
+ FilePath::FromWStringHack(
+ std::wstring(TextDatabase::file_base()) + L"*").value());
std::wstring cur_file;
- while (!(cur_file = enumerator.Next()).empty()) {
+ while (!(cur_file = enumerator.Next().ToWStringHack()).empty()) {
// Convert to the number representing this file.
TextDatabase::DBIdent id = TextDatabase::FileNameToID(cur_file);
if (id) // Will be 0 on error.