| Index: chrome/browser/importer/firefox3_importer.cc
|
| diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc
|
| index e306b2207eff34bedcd6e64ee9377707ea9636aa..4de5054af715eeaa189055ba06af6a8f9e9d74fb 100644
|
| --- a/chrome/browser/importer/firefox3_importer.cc
|
| +++ b/chrome/browser/importer/firefox3_importer.cc
|
| @@ -129,8 +129,6 @@ void Firefox3Importer::ImportHistory() {
|
| "WHERE v.visit_type <= 3";
|
|
|
| sql::Statement s(db.GetUniqueStatement(query));
|
| - if (!s)
|
| - return;
|
|
|
| std::vector<history::URLRow> rows;
|
| while (s.Step() && !cancelled()) {
|
| @@ -197,13 +195,12 @@ void Firefox3Importer::ImportBookmarks() {
|
| "INNER JOIN moz_anno_attributes aa ON ia.anno_attribute_id = aa.id "
|
| "WHERE aa.name = 'bookmarkProperties/POSTData'";
|
| sql::Statement s(db.GetUniqueStatement(query));
|
| - if (s) {
|
| - while (s.Step() && !cancelled())
|
| - post_keyword_ids.insert(s.ColumnInt(0));
|
| - } else {
|
| - NOTREACHED();
|
| +
|
| + if (!s.is_valid())
|
| return;
|
| - }
|
| +
|
| + while (s.Step() && !cancelled())
|
| + post_keyword_ids.insert(s.ColumnInt(0));
|
|
|
| for (size_t i = 0; i < list.size(); ++i) {
|
| BookmarkItem* item = list[i];
|
| @@ -370,7 +367,7 @@ void Firefox3Importer::GetSearchEnginesXMLFiles(
|
| "ORDER BY value ASC";
|
|
|
| sql::Statement s(db.GetUniqueStatement(query));
|
| - if (!s)
|
| + if (!s.is_valid())
|
| return;
|
|
|
| FilePath app_path = app_path_.AppendASCII("searchplugins");
|
| @@ -442,8 +439,6 @@ void Firefox3Importer::LoadRootNodeID(sql::Connection* db,
|
|
|
| const char* query = "SELECT root_name, folder_id FROM moz_bookmarks_roots";
|
| sql::Statement s(db->GetUniqueStatement(query));
|
| - if (!s)
|
| - return;
|
|
|
| while (s.Step()) {
|
| std::string folder = s.ColumnString(0);
|
| @@ -467,10 +462,8 @@ void Firefox3Importer::LoadLivemarkIDs(sql::Connection* db,
|
| "JOIN moz_items_annos b ON a.id = b.anno_attribute_id "
|
| "WHERE a.name = ? ";
|
| sql::Statement s(db->GetUniqueStatement(query));
|
| - if (!s)
|
| - return;
|
| -
|
| s.BindString(0, kFeedAnnotation);
|
| +
|
| while (s.Step() && !cancelled())
|
| livemark->insert(s.ColumnInt(0));
|
| }
|
| @@ -483,10 +476,8 @@ void Firefox3Importer::GetTopBookmarkFolder(sql::Connection* db,
|
| "WHERE b.type = 2 AND b.id = ? "
|
| "ORDER BY b.position";
|
| sql::Statement s(db->GetUniqueStatement(query));
|
| - if (!s)
|
| - return;
|
| -
|
| s.BindInt(0, folder_id);
|
| +
|
| if (s.Step()) {
|
| BookmarkItem* item = new BookmarkItem;
|
| item->parent = -1; // The top level folder has no parent.
|
| @@ -516,10 +507,8 @@ void Firefox3Importer::GetWholeBookmarkFolder(sql::Connection* db,
|
| "WHERE b.type IN (1,2) AND b.parent = ? "
|
| "ORDER BY b.position";
|
| sql::Statement s(db->GetUniqueStatement(query));
|
| - if (!s)
|
| - return;
|
| -
|
| s.BindInt(0, (*list)[position]->id);
|
| +
|
| BookmarkList temp_list;
|
| while (s.Step()) {
|
| BookmarkItem* item = new BookmarkItem;
|
| @@ -554,7 +543,8 @@ void Firefox3Importer::LoadFavicons(
|
| std::vector<history::ImportedFaviconUsage>* favicons) {
|
| const char* query = "SELECT url, data FROM moz_favicons WHERE id=?";
|
| sql::Statement s(db->GetUniqueStatement(query));
|
| - if (!s)
|
| +
|
| + if (!s.is_valid())
|
| return;
|
|
|
| for (FaviconMap::const_iterator i = favicon_map.begin();
|
|
|