diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-30 19:33:53 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-30 19:33:53 +0000 |
commit | 9660ddd38561758694488c7110a7edbeacb1b305 (patch) | |
tree | a08b6f154d33fa14365addf0681ee0f78b35220e /chrome/browser/importer | |
parent | 769d3c1343f9a53a9ade10146c48f022adb099d8 (diff) | |
download | chromium_src-9660ddd38561758694488c7110a7edbeacb1b305.zip chromium_src-9660ddd38561758694488c7110a7edbeacb1b305.tar.gz chromium_src-9660ddd38561758694488c7110a7edbeacb1b305.tar.bz2 |
Correct sqlite wrapper behavior on systems where wchar_t is UTF-32,
for example Linux.
The problem was that old code assumed wstring is UTF-16, which resulted
in string corruption on Linux. I actually tested it on browser/history
unit tests, see http://codereview.chromium.org/18758.
Review URL: http://codereview.chromium.org/18805
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r-- | chrome/browser/importer/firefox3_importer.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc index ea470d5..cb2f13f 100644 --- a/chrome/browser/importer/firefox3_importer.cc +++ b/chrome/browser/importer/firefox3_importer.cc @@ -103,7 +103,7 @@ void Firefox3Importer::ImportHistory() { continue; history::URLRow row(url); - row.set_title(s.column_string16(1)); + row.set_title(s.column_wstring(1)); row.set_visit_count(s.column_int(2)); row.set_hidden(s.column_int(3) == 1); row.set_typed_count(s.column_int(4)); @@ -421,7 +421,7 @@ void Firefox3Importer::GetTopBookmarkFolder(sqlite3* db, int folder_id, BookmarkItem* item = new BookmarkItem; item->parent = -1; // The top level folder has no parent. item->id = folder_id; - item->title = s.column_string16(0); + item->title = s.column_wstring(0); item->type = 2; item->favicon = 0; list->push_back(item); @@ -453,7 +453,7 @@ void Firefox3Importer::GetWholeBookmarkFolder(sqlite3* db, BookmarkList* list, item->parent = static_cast<int>(position); item->id = s.column_int(0); item->url = GURL(s.column_string(1)); - item->title = s.column_string16(2); + item->title = s.column_wstring(2); item->type = s.column_int(3); item->keyword = s.column_string(4); item->date_added = Time::FromTimeT(s.column_int64(5)/1000000); |