diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-07 21:04:07 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-07 21:04:07 +0000 |
commit | 6974f8d6d0e9a14e4b73919e253fd05ca136e33a (patch) | |
tree | ac2ba87b6790623fe0789dfa247094bd823f41e1 /chrome/browser | |
parent | 45aedebe1aca0904253d58bfdf91c13b3b53cbe4 (diff) | |
download | chromium_src-6974f8d6d0e9a14e4b73919e253fd05ca136e33a.zip chromium_src-6974f8d6d0e9a14e4b73919e253fd05ca136e33a.tar.gz chromium_src-6974f8d6d0e9a14e4b73919e253fd05ca136e33a.tar.bz2 |
importer: Convert the remaining wstrings to string16.
BUG=43460
R=mirandac@chromium.org
Review URL: http://codereview.chromium.org/8848003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113464 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/importer/firefox3_importer.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc index 61910ca..d846a84 100644 --- a/chrome/browser/importer/firefox3_importer.cc +++ b/chrome/browser/importer/firefox3_importer.cc @@ -380,28 +380,30 @@ void Firefox3Importer::GetSearchEnginesXMLFiles( // user has added a engine. So we get search engines from sqlite db as well // as from the file system. if (s.Step()) { - const std::wstring kAppPrefix = L"[app]/"; - const std::wstring kProfilePrefix = L"[profile]/"; + const std::string kAppPrefix("[app]/"); + const std::string kProfilePrefix("[profile]/"); do { FilePath file; - std::wstring engine = UTF8ToWide(s.ColumnString(0)); + std::string engine(s.ColumnString(0)); // The string contains [app]/<name>.xml or [profile]/<name>.xml where // the [app] and [profile] need to be replaced with the actual app or // profile path. size_t index = engine.find(kAppPrefix); - if (index != std::wstring::npos) { + if (index != std::string::npos) { // Remove '[app]/'. - file = app_path.Append(FilePath::FromWStringHack( - engine.substr(index + kAppPrefix.length()))); - } else if ((index = engine.find(kProfilePrefix)) != std::wstring::npos) { + file = app_path.AppendASCII(engine.substr(index + kAppPrefix.length())); + } else if ((index = engine.find(kProfilePrefix)) != std::string::npos) { // Remove '[profile]/'. - file = profile_path.Append( - FilePath::FromWStringHack( - engine.substr(index + kProfilePrefix.length()))); + file = profile_path.AppendASCII( + engine.substr(index + kProfilePrefix.length())); } else { // Looks like absolute path to the file. - file = FilePath::FromWStringHack(engine); +#if defined(OS_WIN) + file = FilePath(UTF8ToWide(engine)); +#else + file = FilePath(engine); +#endif } files->push_back(file); } while (s.Step() && !cancelled()); |