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

Unified Diff: chrome/browser/importer/firefox3_importer.cc

Issue 8848003: importer: Convert the remaining wstrings to string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/firefox3_importer.cc
diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc
index 61910ca94336999aa7a99b5b3afa1edb2c80df98..d846a84a1a2f073a54486ac3939afb15d8d6b770 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());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698