summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer
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/importer
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/importer')
-rw-r--r--chrome/browser/importer/firefox2_importer.cc8
-rw-r--r--chrome/browser/importer/ie_importer.cc9
2 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc
index aef2ba2..88da065 100644
--- a/chrome/browser/importer/firefox2_importer.cc
+++ b/chrome/browser/importer/firefox2_importer.cc
@@ -508,13 +508,13 @@ void Firefox2Importer::HTMLUnescape(std::wstring *text) {
void Firefox2Importer::FindXMLFilesInDir(
const std::wstring& dir,
std::vector<std::wstring>* xml_files) {
- file_util::FileEnumerator file_enum(dir, false,
+ file_util::FileEnumerator file_enum(FilePath::FromWStringHack(dir), false,
file_util::FileEnumerator::FILES,
- L"*.xml");
- std::wstring file(file_enum.Next());
+ FILE_PATH_LITERAL("*.xml"));
+ std::wstring file(file_enum.Next().ToWStringHack());
while (!file.empty()) {
xml_files->push_back(file);
- file = file_enum.Next();
+ file = file_enum.Next().ToWStringHack();
}
}
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc
index b171a9c..429b786 100644
--- a/chrome/browser/importer/ie_importer.cc
+++ b/chrome/browser/importer/ie_importer.cc
@@ -469,12 +469,13 @@ void IEImporter::ParseFavoritesFolder(const FavoritesInfo& info,
BookmarkVector* bookmarks) {
std::wstring ie_folder = l10n_util::GetString(IDS_BOOKMARK_GROUP_FROM_IE);
BookmarkVector toolbar_bookmarks;
- std::wstring file;
+ FilePath file;
std::vector<std::wstring> file_list;
- file_util::FileEnumerator file_enumerator(info.path, true,
+ file_util::FileEnumerator file_enumerator(
+ FilePath::FromWStringHack(info.path), true,
file_util::FileEnumerator::FILES);
- while (!(file = file_enumerator.Next()).empty() && !cancelled())
- file_list.push_back(file);
+ while (!(file = file_enumerator.Next()).value().empty() && !cancelled())
+ file_list.push_back(file.ToWStringHack());
// Keep the bookmarks in alphabetical order.
std::sort(file_list.begin(), file_list.end());