зеркало из https://github.com/mozilla/gecko-dev.git
Bug 835543 part 2: Remove deprecated interface nsINavHistoryFullVisitResultNode. r=mak
This commit is contained in:
Родитель
fb4e543b51
Коммит
0a332a0602
|
@ -460,7 +460,6 @@ PlacesController.prototype = {
|
|||
break;
|
||||
case Ci.nsINavHistoryResultNode.RESULT_TYPE_URI:
|
||||
case Ci.nsINavHistoryResultNode.RESULT_TYPE_VISIT:
|
||||
case Ci.nsINavHistoryResultNode.RESULT_TYPE_FULL_VISIT:
|
||||
nodeData["link"] = true;
|
||||
uri = NetUtil.newURI(node.uri);
|
||||
if (PlacesUtils.nodeIsBookmark(node)) {
|
||||
|
|
|
@ -66,7 +66,6 @@ function QI_node(aNode, aIID) {
|
|||
return result;
|
||||
}
|
||||
function asVisit(aNode) QI_node(aNode, Ci.nsINavHistoryVisitResultNode);
|
||||
function asFullVisit(aNode) QI_node(aNode, Ci.nsINavHistoryFullVisitResultNode);
|
||||
function asContainer(aNode) QI_node(aNode, Ci.nsINavHistoryContainerResultNode);
|
||||
function asQuery(aNode) QI_node(aNode, Ci.nsINavHistoryQueryResultNode);
|
||||
|
||||
|
@ -104,7 +103,6 @@ this.PlacesUtils = {
|
|||
TOPIC_BOOKMARKS_RESTORE_FAILED: "bookmarks-restore-failed",
|
||||
|
||||
asVisit: function(aNode) asVisit(aNode),
|
||||
asFullVisit: function(aNode) asFullVisit(aNode),
|
||||
asContainer: function(aNode) asContainer(aNode),
|
||||
asQuery: function(aNode) asQuery(aNode),
|
||||
|
||||
|
@ -182,8 +180,7 @@ this.PlacesUtils = {
|
|||
*/
|
||||
nodeIsVisit: function PU_nodeIsVisit(aNode) {
|
||||
var type = aNode.type;
|
||||
return type == Ci.nsINavHistoryResultNode.RESULT_TYPE_VISIT ||
|
||||
type == Ci.nsINavHistoryResultNode.RESULT_TYPE_FULL_VISIT;
|
||||
return type == Ci.nsINavHistoryResultNode.RESULT_TYPE_VISIT;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -193,8 +190,7 @@ this.PlacesUtils = {
|
|||
* @returns true if the node is a URL item, false otherwise
|
||||
*/
|
||||
uriTypes: [Ci.nsINavHistoryResultNode.RESULT_TYPE_URI,
|
||||
Ci.nsINavHistoryResultNode.RESULT_TYPE_VISIT,
|
||||
Ci.nsINavHistoryResultNode.RESULT_TYPE_FULL_VISIT],
|
||||
Ci.nsINavHistoryResultNode.RESULT_TYPE_VISIT],
|
||||
nodeIsURI: function PU_nodeIsURI(aNode) {
|
||||
return this.uriTypes.indexOf(aNode.type) != -1;
|
||||
},
|
||||
|
|
|
@ -51,10 +51,15 @@ interface nsINavHistoryResultNode : nsISupports
|
|||
*/
|
||||
const unsigned long RESULT_TYPE_URI = 0; // nsINavHistoryResultNode
|
||||
const unsigned long RESULT_TYPE_VISIT = 1; // nsINavHistoryVisitResultNode
|
||||
const unsigned long RESULT_TYPE_FULL_VISIT = 2; // nsINavHistoryFullVisitResultNode
|
||||
|
||||
// Full visit nodes are deprecated and unsupported.
|
||||
// This line exists just to avoid reusing the value:
|
||||
// const unsigned long RESULT_TYPE_FULL_VISIT = 2; // nsINavHistoryFullVisitResultNode
|
||||
|
||||
// Dynamic containers are deprecated and unsupported.
|
||||
// This const exists just to avoid reusing the value.
|
||||
const unsigned long RESULT_TYPE_DYNAMIC_CONTAINER = 4; // nsINavHistoryContainerResultNode
|
||||
// This const exists just to avoid reusing the value:
|
||||
// const unsigned long RESULT_TYPE_DYNAMIC_CONTAINER = 4; // nsINavHistoryContainerResultNode
|
||||
|
||||
const unsigned long RESULT_TYPE_QUERY = 5; // nsINavHistoryQueryResultNode
|
||||
const unsigned long RESULT_TYPE_FOLDER = 6; // nsINavHistoryQueryResultNode
|
||||
const unsigned long RESULT_TYPE_SEPARATOR = 7; // nsINavHistoryResultNode
|
||||
|
@ -165,33 +170,6 @@ interface nsINavHistoryVisitResultNode : nsINavHistoryResultNode
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* This structure will be returned when you request RESULT_TYPE_FULL_VISIT in
|
||||
* the query options. This includes uncommonly used information about each
|
||||
* visit.
|
||||
*/
|
||||
[scriptable, uuid(c49fd9d5-56e2-43eb-932c-f933f28cba85)]
|
||||
interface nsINavHistoryFullVisitResultNode : nsINavHistoryVisitResultNode
|
||||
{
|
||||
/**
|
||||
* This indicates the visit ID of the visit.
|
||||
*/
|
||||
readonly attribute long long visitId;
|
||||
|
||||
/**
|
||||
* This indicates the referring visit ID of the visit. The referrer should
|
||||
* have the same sessionId.
|
||||
*/
|
||||
readonly attribute long long referringVisitId;
|
||||
|
||||
/**
|
||||
* Indicates the transition type of the visit.
|
||||
* One of nsINavHistoryService.TRANSITION_*
|
||||
*/
|
||||
readonly attribute long transitionType;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Base class for container results. This includes all types of groupings.
|
||||
* Bookmark folders and places queries will be QueryResultNodes which extends
|
||||
|
|
|
@ -303,8 +303,7 @@ public:
|
|||
}
|
||||
static bool IsTypeURI(uint32_t type) {
|
||||
return (type == nsINavHistoryResultNode::RESULT_TYPE_URI ||
|
||||
type == nsINavHistoryResultNode::RESULT_TYPE_VISIT ||
|
||||
type == nsINavHistoryResultNode::RESULT_TYPE_FULL_VISIT);
|
||||
type == nsINavHistoryResultNode::RESULT_TYPE_VISIT);
|
||||
}
|
||||
bool IsURI() {
|
||||
uint32_t type;
|
||||
|
@ -312,8 +311,7 @@ public:
|
|||
return IsTypeURI(type);
|
||||
}
|
||||
static bool IsTypeVisit(uint32_t type) {
|
||||
return (type == nsINavHistoryResultNode::RESULT_TYPE_VISIT ||
|
||||
type == nsINavHistoryResultNode::RESULT_TYPE_FULL_VISIT);
|
||||
return type == nsINavHistoryResultNode::RESULT_TYPE_VISIT;
|
||||
}
|
||||
bool IsVisit() {
|
||||
uint32_t type;
|
||||
|
|
Загрузка…
Ссылка в новой задаче