Bug 702765 - Remove unused method nsNavBookmarks::IsRealBookmark().

r=dietrich
This commit is contained in:
Marco Bonardo 2011-11-17 12:12:20 +01:00
Родитель db41b3df9a
Коммит cdbdc9f6e7
2 изменённых файлов: 0 добавлений и 46 удалений

Просмотреть файл

@ -418,43 +418,6 @@ nsNavBookmarks::CreateRoot(const nsCString& name,
return NS_OK; return NS_OK;
} }
bool
nsNavBookmarks::IsRealBookmark(PRInt64 aPlaceId)
{
nsCOMPtr<mozIStorageStatement> stmt = mDB->GetStatement(
"SELECT id "
"FROM moz_bookmarks "
"WHERE fk = :page_id "
"AND type = :item_type "
"AND parent NOT IN ("
"SELECT a.item_id "
"FROM moz_items_annos a "
"JOIN moz_anno_attributes n ON a.anno_attribute_id = n.id "
"WHERE n.name = :anno_name"
") "
);
NS_ENSURE_TRUE(stmt, false);
mozStorageStatementScoper scoper(stmt);
nsresult rv = stmt->BindInt64ByName(NS_LITERAL_CSTRING("page_id"), aPlaceId);
NS_ENSURE_SUCCESS(rv, false);
rv = stmt->BindInt32ByName(NS_LITERAL_CSTRING("item_type"), TYPE_BOOKMARK);
NS_ENSURE_SUCCESS(rv, false);
rv = stmt->BindUTF8StringByName(NS_LITERAL_CSTRING("anno_name"),
NS_LITERAL_CSTRING(LMANNO_FEEDURI));
NS_ENSURE_SUCCESS(rv, false);
// If we get any rows, then there exists at least one bookmark corresponding
// to aPlaceId that is not a livemark item.
bool isBookmark = false;
rv = stmt->ExecuteStep(&isBookmark);
NS_ENSURE_SUCCESS(rv, false);
return isBookmark;
}
// nsNavBookmarks::IsBookmarkedInDatabase // nsNavBookmarks::IsBookmarkedInDatabase
// //
// This checks to see if the specified place_id is actually bookmarked. // This checks to see if the specified place_id is actually bookmarked.

Просмотреть файл

@ -225,15 +225,6 @@ public:
PRInt32* aIndex, PRInt32* aIndex,
PRInt64* aNewFolder); PRInt64* aNewFolder);
/**
* Determines if we have a real bookmark or not (not a livemark).
*
* @param aPlaceId
* The place_id of the location to check against.
* @return true if it's a real bookmark, false otherwise.
*/
bool IsRealBookmark(PRInt64 aPlaceId);
/** /**
* Fetches information about the specified id from the database. * Fetches information about the specified id from the database.
* *