зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1140395 - Deprecate old keywords API. r=ttaubert
This commit is contained in:
Родитель
371ed78417
Коммит
648bd5431e
|
@ -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(
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче