diff --git a/toolkit/components/places/PlacesUtils.jsm b/toolkit/components/places/PlacesUtils.jsm index 7ba799b63937..5238103032dd 100644 --- a/toolkit/components/places/PlacesUtils.jsm +++ b/toolkit/components/places/PlacesUtils.jsm @@ -880,6 +880,8 @@ this.PlacesUtils = { * Set the POST data associated with a bookmark, if any. * Used by POST keywords. * @param aBookmarkId + * + * @deprecated Use PlacesUtils.keywords.insert() API instead. */ setPostDataForBookmark(aBookmarkId, aPostData) { if (!aPostData) @@ -923,6 +925,8 @@ this.PlacesUtils = { * Get the POST data associated with a bookmark, if any. * @param aBookmarkId * @returns string of POST data if set for aBookmarkId. null otherwise. + * + * @deprecated Use PlacesUtils.keywords.fetch() API instead. */ getPostDataForBookmark(aBookmarkId) { let stmt = PlacesUtils.history.DBConnection.createStatement( diff --git a/toolkit/components/places/nsINavBookmarksService.idl b/toolkit/components/places/nsINavBookmarksService.idl index 13d803d27569..c11bc1d8e82e 100644 --- a/toolkit/components/places/nsINavBookmarksService.idl +++ b/toolkit/components/places/nsINavBookmarksService.idl @@ -533,18 +533,24 @@ interface nsINavBookmarksService : nsISupports * * Use an empty keyword to clear the keyword associated with the URI. * In both of these cases, succeeds but does nothing if the URL/keyword is not found. + * + * @deprecated Use PlacesUtils.keywords.insert() API instead. */ void setKeywordForBookmark(in long long aItemId, in AString aKeyword); /** * Retrieves the keyword for the given bookmark. Will be void string * (null in JS) if no such keyword is found. + * + * @deprecated Use PlacesUtils.keywords.fetch() API instead. */ AString getKeywordForBookmark(in long long aItemId); /** * Returns the URI associated with the given keyword. Empty if no such * keyword is found. + * + * @deprecated Use PlacesUtils.keywords.fetch() API instead. */ nsIURI getURIForKeyword(in AString keyword); diff --git a/toolkit/components/places/nsNavBookmarks.cpp b/toolkit/components/places/nsNavBookmarks.cpp index 452fa27b994b..9e15253434d7 100644 --- a/toolkit/components/places/nsNavBookmarks.cpp +++ b/toolkit/components/places/nsNavBookmarks.cpp @@ -2445,6 +2445,8 @@ nsNavBookmarks::GetURIForKeyword(const nsAString& aUserCasedKeyword, NS_ENSURE_TRUE(!aUserCasedKeyword.IsEmpty(), NS_ERROR_INVALID_ARG); *aURI = nullptr; + PLACES_WARN_DEPRECATED(); + // Shortcuts are always lowercased internally. nsAutoString keyword(aUserCasedKeyword); ToLowerCase(keyword);