зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1118413 - Mark virtual overridden functions as MOZ_OVERRIDE in places; r=mak
This commit is contained in:
Родитель
8b2a7569c2
Коммит
126a9df841
|
@ -39,8 +39,8 @@ protected:
|
||||||
* methods this class assumes silent or notreached.
|
* methods this class assumes silent or notreached.
|
||||||
*/
|
*/
|
||||||
#define NS_DECL_ASYNCSTATEMENTCALLBACK \
|
#define NS_DECL_ASYNCSTATEMENTCALLBACK \
|
||||||
NS_IMETHOD HandleResult(mozIStorageResultSet *); \
|
NS_IMETHOD HandleResult(mozIStorageResultSet *) MOZ_OVERRIDE; \
|
||||||
NS_IMETHOD HandleCompletion(uint16_t);
|
NS_IMETHOD HandleCompletion(uint16_t) MOZ_OVERRIDE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utils to bind a specified URI (or URL) to a statement or binding params, at
|
* Utils to bind a specified URI (or URL) to a statement or binding params, at
|
||||||
|
|
|
@ -518,7 +518,7 @@ public:
|
||||||
|
|
||||||
// Note: the return value matters here. We call into this method, it's not
|
// Note: the return value matters here. We call into this method, it's not
|
||||||
// just xpcom boilerplate.
|
// just xpcom boilerplate.
|
||||||
NS_IMETHOD Complete(nsresult aResult, nsISupports* aStatement)
|
NS_IMETHOD Complete(nsresult aResult, nsISupports* aStatement) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
NS_ENSURE_SUCCESS(aResult, aResult);
|
NS_ENSURE_SUCCESS(aResult, aResult);
|
||||||
nsCOMPtr<mozIStorageAsyncStatement> stmt = do_QueryInterface(aStatement);
|
nsCOMPtr<mozIStorageAsyncStatement> stmt = do_QueryInterface(aStatement);
|
||||||
|
@ -531,7 +531,7 @@ public:
|
||||||
return stmt->ExecuteAsync(this, getter_AddRefs(handle));
|
return stmt->ExecuteAsync(this, getter_AddRefs(handle));
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD HandleResult(mozIStorageResultSet* aResults)
|
NS_IMETHOD HandleResult(mozIStorageResultSet* aResults) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
// If this method is called, we've gotten results, which means we have a
|
// If this method is called, we've gotten results, which means we have a
|
||||||
// visit.
|
// visit.
|
||||||
|
@ -539,14 +539,14 @@ public:
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD HandleError(mozIStorageError* aError)
|
NS_IMETHOD HandleError(mozIStorageError* aError) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
// mIsVisited is already set to false, and that's the assumption we will
|
// mIsVisited is already set to false, and that's the assumption we will
|
||||||
// make if an error occurred.
|
// make if an error occurred.
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD HandleCompletion(uint16_t aReason)
|
NS_IMETHOD HandleCompletion(uint16_t aReason) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
if (aReason != mozIStorageStatementCallback::REASON_FINISHED) {
|
if (aReason != mozIStorageStatementCallback::REASON_FINISHED) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -1474,13 +1474,13 @@ public:
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD HandleError(nsresult aResultCode, mozIPlaceInfo *aPlaceInfo)
|
NS_IMETHOD HandleError(nsresult aResultCode, mozIPlaceInfo *aPlaceInfo) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
// Just don't add the annotations in case the visit isn't added.
|
// Just don't add the annotations in case the visit isn't added.
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD HandleResult(mozIPlaceInfo *aPlaceInfo)
|
NS_IMETHOD HandleResult(mozIPlaceInfo *aPlaceInfo) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
// Exit silently if the download destination is not a local file.
|
// Exit silently if the download destination is not a local file.
|
||||||
nsCOMPtr<nsIFileURL> destinationFileURL = do_QueryInterface(mDestination);
|
nsCOMPtr<nsIFileURL> destinationFileURL = do_QueryInterface(mDestination);
|
||||||
|
@ -1542,7 +1542,7 @@ public:
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD HandleCompletion()
|
NS_IMETHOD HandleCompletion() MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -2033,7 +2033,7 @@ public:
|
||||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD Complete(nsresult aStatus, nsISupports* aConnection) {
|
NS_IMETHOD Complete(nsresult aStatus, nsISupports* aConnection) MOZ_OVERRIDE {
|
||||||
if (NS_FAILED(aStatus))
|
if (NS_FAILED(aStatus))
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
mReadOnlyDBConn = do_QueryInterface(aConnection);
|
mReadOnlyDBConn = do_QueryInterface(aConnection);
|
||||||
|
|
|
@ -91,7 +91,7 @@ public:
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
//// mozIStorageStatementCallback
|
//// mozIStorageStatementCallback
|
||||||
|
|
||||||
NS_IMETHOD HandleResult(mozIStorageResultSet *aResultSet)
|
NS_IMETHOD HandleResult(mozIStorageResultSet *aResultSet) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
// We will only get one row back in total, so we do not need to loop.
|
// We will only get one row back in total, so we do not need to loop.
|
||||||
nsCOMPtr<mozIStorageRow> row;
|
nsCOMPtr<mozIStorageRow> row;
|
||||||
|
@ -142,7 +142,7 @@ public:
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD HandleCompletion(uint16_t aReason)
|
NS_IMETHOD HandleCompletion(uint16_t aReason) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!mReturnDefaultIcon)
|
if (!mReturnDefaultIcon)
|
||||||
return mOutputStream->Close();
|
return mOutputStream->Close();
|
||||||
|
@ -168,12 +168,12 @@ public:
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
//// nsIRequestObserver
|
//// nsIRequestObserver
|
||||||
|
|
||||||
NS_IMETHOD OnStartRequest(nsIRequest *, nsISupports *)
|
NS_IMETHOD OnStartRequest(nsIRequest *, nsISupports *) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD OnStopRequest(nsIRequest *, nsISupports *, nsresult aStatusCode)
|
NS_IMETHOD OnStopRequest(nsIRequest *, nsISupports *, nsresult aStatusCode) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
// We always need to close our output stream, regardless of the status code.
|
// We always need to close our output stream, regardless of the status code.
|
||||||
(void)mOutputStream->Close();
|
(void)mOutputStream->Close();
|
||||||
|
|
|
@ -367,7 +367,7 @@ private:
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
|
||||||
NS_IMETHOD DoTransaction() {
|
NS_IMETHOD DoTransaction() MOZ_OVERRIDE {
|
||||||
nsNavBookmarks* bookmarks = nsNavBookmarks::GetBookmarksService();
|
nsNavBookmarks* bookmarks = nsNavBookmarks::GetBookmarksService();
|
||||||
NS_ENSURE_TRUE(bookmarks, NS_ERROR_OUT_OF_MEMORY);
|
NS_ENSURE_TRUE(bookmarks, NS_ERROR_OUT_OF_MEMORY);
|
||||||
BookmarkData folder;
|
BookmarkData folder;
|
||||||
|
@ -382,7 +382,7 @@ private:
|
||||||
return bookmarks->RemoveItem(mID);
|
return bookmarks->RemoveItem(mID);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD UndoTransaction() {
|
NS_IMETHOD UndoTransaction() MOZ_OVERRIDE {
|
||||||
nsNavBookmarks* bookmarks = nsNavBookmarks::GetBookmarksService();
|
nsNavBookmarks* bookmarks = nsNavBookmarks::GetBookmarksService();
|
||||||
NS_ENSURE_TRUE(bookmarks, NS_ERROR_OUT_OF_MEMORY);
|
NS_ENSURE_TRUE(bookmarks, NS_ERROR_OUT_OF_MEMORY);
|
||||||
int64_t newFolder;
|
int64_t newFolder;
|
||||||
|
@ -390,16 +390,16 @@ private:
|
||||||
&mIndex, EmptyCString(), &newFolder);
|
&mIndex, EmptyCString(), &newFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD RedoTransaction() {
|
NS_IMETHOD RedoTransaction() MOZ_OVERRIDE {
|
||||||
return DoTransaction();
|
return DoTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD GetIsTransient(bool* aResult) {
|
NS_IMETHOD GetIsTransient(bool* aResult) MOZ_OVERRIDE {
|
||||||
*aResult = false;
|
*aResult = false;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD Merge(nsITransaction* aTransaction, bool* aResult) {
|
NS_IMETHOD Merge(nsITransaction* aTransaction, bool* aResult) MOZ_OVERRIDE {
|
||||||
*aResult = false;
|
*aResult = false;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,41 +60,41 @@ private:
|
||||||
|
|
||||||
// Declare methods for implementing nsINavBookmarkObserver
|
// Declare methods for implementing nsINavBookmarkObserver
|
||||||
// and nsINavHistoryObserver (some methods, such as BeginUpdateBatch overlap)
|
// and nsINavHistoryObserver (some methods, such as BeginUpdateBatch overlap)
|
||||||
#define NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE \
|
#define NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE(...) \
|
||||||
NS_DECL_NSINAVBOOKMARKOBSERVER \
|
NS_DECL_NSINAVBOOKMARKOBSERVER \
|
||||||
NS_IMETHOD OnTitleChanged(nsIURI* aURI, const nsAString& aPageTitle, \
|
NS_IMETHOD OnTitleChanged(nsIURI* aURI, const nsAString& aPageTitle, \
|
||||||
const nsACString& aGUID); \
|
const nsACString& aGUID) __VA_ARGS__; \
|
||||||
NS_IMETHOD OnFrecencyChanged(nsIURI* aURI, int32_t aNewFrecency, \
|
NS_IMETHOD OnFrecencyChanged(nsIURI* aURI, int32_t aNewFrecency, \
|
||||||
const nsACString& aGUID, bool aHidden, \
|
const nsACString& aGUID, bool aHidden, \
|
||||||
PRTime aLastVisitDate); \
|
PRTime aLastVisitDate) __VA_ARGS__; \
|
||||||
NS_IMETHOD OnManyFrecenciesChanged(); \
|
NS_IMETHOD OnManyFrecenciesChanged() __VA_ARGS__; \
|
||||||
NS_IMETHOD OnDeleteURI(nsIURI *aURI, const nsACString& aGUID, \
|
NS_IMETHOD OnDeleteURI(nsIURI *aURI, const nsACString& aGUID, \
|
||||||
uint16_t aReason); \
|
uint16_t aReason) __VA_ARGS__; \
|
||||||
NS_IMETHOD OnClearHistory(); \
|
NS_IMETHOD OnClearHistory() __VA_ARGS__; \
|
||||||
NS_IMETHOD OnPageChanged(nsIURI *aURI, uint32_t aChangedAttribute, \
|
NS_IMETHOD OnPageChanged(nsIURI *aURI, uint32_t aChangedAttribute, \
|
||||||
const nsAString &aNewValue, \
|
const nsAString &aNewValue, \
|
||||||
const nsACString &aGUID); \
|
const nsACString &aGUID) __VA_ARGS__; \
|
||||||
NS_IMETHOD OnDeleteVisits(nsIURI* aURI, PRTime aVisitTime, \
|
NS_IMETHOD OnDeleteVisits(nsIURI* aURI, PRTime aVisitTime, \
|
||||||
const nsACString& aGUID, uint16_t aReason, \
|
const nsACString& aGUID, uint16_t aReason, \
|
||||||
uint32_t aTransitionType);
|
uint32_t aTransitionType) __VA_ARGS__;
|
||||||
|
|
||||||
// The internal version has an output aAdded parameter, it is incremented by
|
// The internal version has an output aAdded parameter, it is incremented by
|
||||||
// query nodes when the visited uri belongs to them. If no such query exists,
|
// query nodes when the visited uri belongs to them. If no such query exists,
|
||||||
// the history result creates a new query node dynamically.
|
// the history result creates a new query node dynamically.
|
||||||
#define NS_DECL_BOOKMARK_HISTORY_OBSERVER_INTERNAL \
|
#define NS_DECL_BOOKMARK_HISTORY_OBSERVER_INTERNAL \
|
||||||
NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE \
|
NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE() \
|
||||||
NS_IMETHOD OnVisit(nsIURI* aURI, int64_t aVisitId, PRTime aTime, \
|
NS_IMETHOD OnVisit(nsIURI* aURI, int64_t aVisitId, PRTime aTime, \
|
||||||
int64_t aSessionId, int64_t aReferringId, \
|
int64_t aSessionId, int64_t aReferringId, \
|
||||||
uint32_t aTransitionType, const nsACString& aGUID, \
|
uint32_t aTransitionType, const nsACString& aGUID, \
|
||||||
bool aHidden, uint32_t* aAdded);
|
bool aHidden, uint32_t* aAdded);
|
||||||
|
|
||||||
// The external version is used by results.
|
// The external version is used by results.
|
||||||
#define NS_DECL_BOOKMARK_HISTORY_OBSERVER_EXTERNAL \
|
#define NS_DECL_BOOKMARK_HISTORY_OBSERVER_EXTERNAL(...) \
|
||||||
NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE \
|
NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE(__VA_ARGS__) \
|
||||||
NS_IMETHOD OnVisit(nsIURI* aURI, int64_t aVisitId, PRTime aTime, \
|
NS_IMETHOD OnVisit(nsIURI* aURI, int64_t aVisitId, PRTime aTime, \
|
||||||
int64_t aSessionId, int64_t aReferringId, \
|
int64_t aSessionId, int64_t aReferringId, \
|
||||||
uint32_t aTransitionType, const nsACString& aGUID, \
|
uint32_t aTransitionType, const nsACString& aGUID, \
|
||||||
bool aHidden);
|
bool aHidden) __VA_ARGS__;
|
||||||
|
|
||||||
// nsNavHistoryResult
|
// nsNavHistoryResult
|
||||||
//
|
//
|
||||||
|
@ -122,7 +122,7 @@ public:
|
||||||
|
|
||||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||||
NS_DECL_NSINAVHISTORYRESULT
|
NS_DECL_NSINAVHISTORYRESULT
|
||||||
NS_DECL_BOOKMARK_HISTORY_OBSERVER_EXTERNAL
|
NS_DECL_BOOKMARK_HISTORY_OBSERVER_EXTERNAL(MOZ_OVERRIDE)
|
||||||
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsNavHistoryResult, nsINavHistoryResult)
|
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsNavHistoryResult, nsINavHistoryResult)
|
||||||
|
|
||||||
void AddHistoryObserver(nsNavHistoryQueryResultNode* aNode);
|
void AddHistoryObserver(nsNavHistoryQueryResultNode* aNode);
|
||||||
|
@ -204,21 +204,21 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsNavHistoryResult, NS_NAVHISTORYRESULT_IID)
|
||||||
// (which depends on the definition of container result node), and GetUri
|
// (which depends on the definition of container result node), and GetUri
|
||||||
// (which is overridded for lazy construction for some containers).
|
// (which is overridded for lazy construction for some containers).
|
||||||
#define NS_IMPLEMENT_SIMPLE_RESULTNODE \
|
#define NS_IMPLEMENT_SIMPLE_RESULTNODE \
|
||||||
NS_IMETHOD GetTitle(nsACString& aTitle) \
|
NS_IMETHOD GetTitle(nsACString& aTitle) MOZ_OVERRIDE \
|
||||||
{ aTitle = mTitle; return NS_OK; } \
|
{ aTitle = mTitle; return NS_OK; } \
|
||||||
NS_IMETHOD GetAccessCount(uint32_t* aAccessCount) \
|
NS_IMETHOD GetAccessCount(uint32_t* aAccessCount) MOZ_OVERRIDE \
|
||||||
{ *aAccessCount = mAccessCount; return NS_OK; } \
|
{ *aAccessCount = mAccessCount; return NS_OK; } \
|
||||||
NS_IMETHOD GetTime(PRTime* aTime) \
|
NS_IMETHOD GetTime(PRTime* aTime) MOZ_OVERRIDE \
|
||||||
{ *aTime = mTime; return NS_OK; } \
|
{ *aTime = mTime; return NS_OK; } \
|
||||||
NS_IMETHOD GetIndentLevel(int32_t* aIndentLevel) \
|
NS_IMETHOD GetIndentLevel(int32_t* aIndentLevel) MOZ_OVERRIDE \
|
||||||
{ *aIndentLevel = mIndentLevel; return NS_OK; } \
|
{ *aIndentLevel = mIndentLevel; return NS_OK; } \
|
||||||
NS_IMETHOD GetBookmarkIndex(int32_t* aIndex) \
|
NS_IMETHOD GetBookmarkIndex(int32_t* aIndex) MOZ_OVERRIDE \
|
||||||
{ *aIndex = mBookmarkIndex; return NS_OK; } \
|
{ *aIndex = mBookmarkIndex; return NS_OK; } \
|
||||||
NS_IMETHOD GetDateAdded(PRTime* aDateAdded) \
|
NS_IMETHOD GetDateAdded(PRTime* aDateAdded) MOZ_OVERRIDE \
|
||||||
{ *aDateAdded = mDateAdded; return NS_OK; } \
|
{ *aDateAdded = mDateAdded; return NS_OK; } \
|
||||||
NS_IMETHOD GetLastModified(PRTime* aLastModified) \
|
NS_IMETHOD GetLastModified(PRTime* aLastModified) MOZ_OVERRIDE \
|
||||||
{ *aLastModified = mLastModified; return NS_OK; } \
|
{ *aLastModified = mLastModified; return NS_OK; } \
|
||||||
NS_IMETHOD GetItemId(int64_t* aId) \
|
NS_IMETHOD GetItemId(int64_t* aId) MOZ_OVERRIDE \
|
||||||
{ *aId = mItemId; return NS_OK; }
|
{ *aId = mItemId; return NS_OK; }
|
||||||
|
|
||||||
// This is used by the base classes instead of
|
// This is used by the base classes instead of
|
||||||
|
@ -232,17 +232,17 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsNavHistoryResult, NS_NAVHISTORYRESULT_IID)
|
||||||
// buffer.)
|
// buffer.)
|
||||||
#define NS_FORWARD_COMMON_RESULTNODE_TO_BASE \
|
#define NS_FORWARD_COMMON_RESULTNODE_TO_BASE \
|
||||||
NS_IMPLEMENT_SIMPLE_RESULTNODE \
|
NS_IMPLEMENT_SIMPLE_RESULTNODE \
|
||||||
NS_IMETHOD GetIcon(nsACString& aIcon) \
|
NS_IMETHOD GetIcon(nsACString& aIcon) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryResultNode::GetIcon(aIcon); } \
|
{ return nsNavHistoryResultNode::GetIcon(aIcon); } \
|
||||||
NS_IMETHOD GetParent(nsINavHistoryContainerResultNode** aParent) \
|
NS_IMETHOD GetParent(nsINavHistoryContainerResultNode** aParent) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryResultNode::GetParent(aParent); } \
|
{ return nsNavHistoryResultNode::GetParent(aParent); } \
|
||||||
NS_IMETHOD GetParentResult(nsINavHistoryResult** aResult) \
|
NS_IMETHOD GetParentResult(nsINavHistoryResult** aResult) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryResultNode::GetParentResult(aResult); } \
|
{ return nsNavHistoryResultNode::GetParentResult(aResult); } \
|
||||||
NS_IMETHOD GetTags(nsAString& aTags) \
|
NS_IMETHOD GetTags(nsAString& aTags) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryResultNode::GetTags(aTags); } \
|
{ return nsNavHistoryResultNode::GetTags(aTags); } \
|
||||||
NS_IMETHOD GetPageGuid(nsACString& aPageGuid) \
|
NS_IMETHOD GetPageGuid(nsACString& aPageGuid) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryResultNode::GetPageGuid(aPageGuid); } \
|
{ return nsNavHistoryResultNode::GetPageGuid(aPageGuid); } \
|
||||||
NS_IMETHOD GetBookmarkGuid(nsACString& aBookmarkGuid) \
|
NS_IMETHOD GetBookmarkGuid(nsACString& aBookmarkGuid) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryResultNode::GetBookmarkGuid(aBookmarkGuid); }
|
{ return nsNavHistoryResultNode::GetBookmarkGuid(aBookmarkGuid); }
|
||||||
|
|
||||||
class nsNavHistoryResultNode : public nsINavHistoryResultNode
|
class nsNavHistoryResultNode : public nsINavHistoryResultNode
|
||||||
|
@ -258,16 +258,16 @@ public:
|
||||||
NS_DECL_CYCLE_COLLECTION_CLASS(nsNavHistoryResultNode)
|
NS_DECL_CYCLE_COLLECTION_CLASS(nsNavHistoryResultNode)
|
||||||
|
|
||||||
NS_IMPLEMENT_SIMPLE_RESULTNODE
|
NS_IMPLEMENT_SIMPLE_RESULTNODE
|
||||||
NS_IMETHOD GetIcon(nsACString& aIcon);
|
NS_IMETHOD GetIcon(nsACString& aIcon) MOZ_OVERRIDE;
|
||||||
NS_IMETHOD GetParent(nsINavHistoryContainerResultNode** aParent);
|
NS_IMETHOD GetParent(nsINavHistoryContainerResultNode** aParent) MOZ_OVERRIDE;
|
||||||
NS_IMETHOD GetParentResult(nsINavHistoryResult** aResult);
|
NS_IMETHOD GetParentResult(nsINavHistoryResult** aResult) MOZ_OVERRIDE;
|
||||||
NS_IMETHOD GetType(uint32_t* type)
|
NS_IMETHOD GetType(uint32_t* type) MOZ_OVERRIDE
|
||||||
{ *type = nsNavHistoryResultNode::RESULT_TYPE_URI; return NS_OK; }
|
{ *type = nsNavHistoryResultNode::RESULT_TYPE_URI; return NS_OK; }
|
||||||
NS_IMETHOD GetUri(nsACString& aURI)
|
NS_IMETHOD GetUri(nsACString& aURI) MOZ_OVERRIDE
|
||||||
{ aURI = mURI; return NS_OK; }
|
{ aURI = mURI; return NS_OK; }
|
||||||
NS_IMETHOD GetTags(nsAString& aTags);
|
NS_IMETHOD GetTags(nsAString& aTags) MOZ_OVERRIDE;
|
||||||
NS_IMETHOD GetPageGuid(nsACString& aPageGuid);
|
NS_IMETHOD GetPageGuid(nsACString& aPageGuid) MOZ_OVERRIDE;
|
||||||
NS_IMETHOD GetBookmarkGuid(nsACString& aBookmarkGuid);
|
NS_IMETHOD GetBookmarkGuid(nsACString& aBookmarkGuid) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void OnRemoving();
|
virtual void OnRemoving();
|
||||||
|
|
||||||
|
@ -394,21 +394,21 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsNavHistoryResultNode, NS_NAVHISTORYRESULTNODE_II
|
||||||
// derived classes each provide their own implementation of has children and
|
// derived classes each provide their own implementation of has children and
|
||||||
// forward the rest to us using this macro
|
// forward the rest to us using this macro
|
||||||
#define NS_FORWARD_CONTAINERNODE_EXCEPT_HASCHILDREN \
|
#define NS_FORWARD_CONTAINERNODE_EXCEPT_HASCHILDREN \
|
||||||
NS_IMETHOD GetState(uint16_t* _state) \
|
NS_IMETHOD GetState(uint16_t* _state) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryContainerResultNode::GetState(_state); } \
|
{ return nsNavHistoryContainerResultNode::GetState(_state); } \
|
||||||
NS_IMETHOD GetContainerOpen(bool *aContainerOpen) \
|
NS_IMETHOD GetContainerOpen(bool *aContainerOpen) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryContainerResultNode::GetContainerOpen(aContainerOpen); } \
|
{ return nsNavHistoryContainerResultNode::GetContainerOpen(aContainerOpen); } \
|
||||||
NS_IMETHOD SetContainerOpen(bool aContainerOpen) \
|
NS_IMETHOD SetContainerOpen(bool aContainerOpen) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryContainerResultNode::SetContainerOpen(aContainerOpen); } \
|
{ return nsNavHistoryContainerResultNode::SetContainerOpen(aContainerOpen); } \
|
||||||
NS_IMETHOD GetChildCount(uint32_t *aChildCount) \
|
NS_IMETHOD GetChildCount(uint32_t *aChildCount) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryContainerResultNode::GetChildCount(aChildCount); } \
|
{ return nsNavHistoryContainerResultNode::GetChildCount(aChildCount); } \
|
||||||
NS_IMETHOD GetChild(uint32_t index, nsINavHistoryResultNode **_retval) \
|
NS_IMETHOD GetChild(uint32_t index, nsINavHistoryResultNode **_retval) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryContainerResultNode::GetChild(index, _retval); } \
|
{ return nsNavHistoryContainerResultNode::GetChild(index, _retval); } \
|
||||||
NS_IMETHOD GetChildIndex(nsINavHistoryResultNode* aNode, uint32_t* _retval) \
|
NS_IMETHOD GetChildIndex(nsINavHistoryResultNode* aNode, uint32_t* _retval) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryContainerResultNode::GetChildIndex(aNode, _retval); } \
|
{ return nsNavHistoryContainerResultNode::GetChildIndex(aNode, _retval); } \
|
||||||
NS_IMETHOD FindNodeByDetails(const nsACString& aURIString, PRTime aTime, \
|
NS_IMETHOD FindNodeByDetails(const nsACString& aURIString, PRTime aTime, \
|
||||||
int64_t aItemId, bool aRecursive, \
|
int64_t aItemId, bool aRecursive, \
|
||||||
nsINavHistoryResultNode** _retval) \
|
nsINavHistoryResultNode** _retval) MOZ_OVERRIDE \
|
||||||
{ return nsNavHistoryContainerResultNode::FindNodeByDetails(aURIString, aTime, aItemId, \
|
{ return nsNavHistoryContainerResultNode::FindNodeByDetails(aURIString, aTime, aItemId, \
|
||||||
aRecursive, _retval); }
|
aRecursive, _retval); }
|
||||||
|
|
||||||
|
@ -436,15 +436,15 @@ public:
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsNavHistoryContainerResultNode, nsNavHistoryResultNode)
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsNavHistoryContainerResultNode, nsNavHistoryResultNode)
|
||||||
NS_FORWARD_COMMON_RESULTNODE_TO_BASE
|
NS_FORWARD_COMMON_RESULTNODE_TO_BASE
|
||||||
NS_IMETHOD GetType(uint32_t* type)
|
NS_IMETHOD GetType(uint32_t* type) MOZ_OVERRIDE
|
||||||
{ *type = mContainerType; return NS_OK; }
|
{ *type = mContainerType; return NS_OK; }
|
||||||
NS_IMETHOD GetUri(nsACString& aURI)
|
NS_IMETHOD GetUri(nsACString& aURI) MOZ_OVERRIDE
|
||||||
{ aURI = mURI; return NS_OK; }
|
{ aURI = mURI; return NS_OK; }
|
||||||
NS_DECL_NSINAVHISTORYCONTAINERRESULTNODE
|
NS_DECL_NSINAVHISTORYCONTAINERRESULTNODE
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual void OnRemoving();
|
virtual void OnRemoving() MOZ_OVERRIDE;
|
||||||
|
|
||||||
bool AreChildrenVisible();
|
bool AreChildrenVisible();
|
||||||
|
|
||||||
|
@ -631,20 +631,20 @@ public:
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
NS_FORWARD_COMMON_RESULTNODE_TO_BASE
|
NS_FORWARD_COMMON_RESULTNODE_TO_BASE
|
||||||
NS_IMETHOD GetType(uint32_t* type)
|
NS_IMETHOD GetType(uint32_t* type) MOZ_OVERRIDE
|
||||||
{ *type = nsNavHistoryResultNode::RESULT_TYPE_QUERY; return NS_OK; }
|
{ *type = nsNavHistoryResultNode::RESULT_TYPE_QUERY; return NS_OK; }
|
||||||
NS_IMETHOD GetUri(nsACString& aURI); // does special lazy creation
|
NS_IMETHOD GetUri(nsACString& aURI) MOZ_OVERRIDE; // does special lazy creation
|
||||||
NS_FORWARD_CONTAINERNODE_EXCEPT_HASCHILDREN
|
NS_FORWARD_CONTAINERNODE_EXCEPT_HASCHILDREN
|
||||||
NS_IMETHOD GetHasChildren(bool* aHasChildren);
|
NS_IMETHOD GetHasChildren(bool* aHasChildren) MOZ_OVERRIDE;
|
||||||
NS_DECL_NSINAVHISTORYQUERYRESULTNODE
|
NS_DECL_NSINAVHISTORYQUERYRESULTNODE
|
||||||
|
|
||||||
bool CanExpand();
|
bool CanExpand();
|
||||||
bool IsContainersQuery();
|
bool IsContainersQuery();
|
||||||
|
|
||||||
virtual nsresult OpenContainer();
|
virtual nsresult OpenContainer() MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_DECL_BOOKMARK_HISTORY_OBSERVER_INTERNAL
|
NS_DECL_BOOKMARK_HISTORY_OBSERVER_INTERNAL
|
||||||
virtual void OnRemoving();
|
virtual void OnRemoving() MOZ_OVERRIDE;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// this constructs lazily mURI from mQueries and mOptions, call
|
// this constructs lazily mURI from mQueries and mOptions, call
|
||||||
|
@ -667,12 +667,12 @@ public:
|
||||||
|
|
||||||
nsresult FillChildren();
|
nsresult FillChildren();
|
||||||
void ClearChildren(bool unregister);
|
void ClearChildren(bool unregister);
|
||||||
nsresult Refresh();
|
nsresult Refresh() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual uint16_t GetSortType();
|
virtual uint16_t GetSortType() MOZ_OVERRIDE;
|
||||||
virtual void GetSortingAnnotation(nsACString& aSortingAnnotation);
|
virtual void GetSortingAnnotation(nsACString& aSortingAnnotation) MOZ_OVERRIDE;
|
||||||
virtual void RecursiveSort(const char* aData,
|
virtual void RecursiveSort(const char* aData,
|
||||||
SortComparator aComparator);
|
SortComparator aComparator) MOZ_OVERRIDE;
|
||||||
|
|
||||||
nsCOMPtr<nsIURI> mRemovingURI;
|
nsCOMPtr<nsIURI> mRemovingURI;
|
||||||
nsresult NotifyIfTagsChanged(nsIURI* aURI);
|
nsresult NotifyIfTagsChanged(nsIURI* aURI);
|
||||||
|
@ -704,7 +704,7 @@ public:
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
NS_FORWARD_COMMON_RESULTNODE_TO_BASE
|
NS_FORWARD_COMMON_RESULTNODE_TO_BASE
|
||||||
NS_IMETHOD GetType(uint32_t* type) {
|
NS_IMETHOD GetType(uint32_t* type) MOZ_OVERRIDE {
|
||||||
if (mTargetFolderItemId != mItemId) {
|
if (mTargetFolderItemId != mItemId) {
|
||||||
*type = nsNavHistoryResultNode::RESULT_TYPE_FOLDER_SHORTCUT;
|
*type = nsNavHistoryResultNode::RESULT_TYPE_FOLDER_SHORTCUT;
|
||||||
} else {
|
} else {
|
||||||
|
@ -712,21 +712,21 @@ public:
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
NS_IMETHOD GetUri(nsACString& aURI);
|
NS_IMETHOD GetUri(nsACString& aURI) MOZ_OVERRIDE;
|
||||||
NS_FORWARD_CONTAINERNODE_EXCEPT_HASCHILDREN
|
NS_FORWARD_CONTAINERNODE_EXCEPT_HASCHILDREN
|
||||||
NS_IMETHOD GetHasChildren(bool* aHasChildren);
|
NS_IMETHOD GetHasChildren(bool* aHasChildren) MOZ_OVERRIDE;
|
||||||
NS_DECL_NSINAVHISTORYQUERYRESULTNODE
|
NS_DECL_NSINAVHISTORYQUERYRESULTNODE
|
||||||
|
|
||||||
virtual nsresult OpenContainer();
|
virtual nsresult OpenContainer() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsresult OpenContainerAsync();
|
virtual nsresult OpenContainerAsync() MOZ_OVERRIDE;
|
||||||
NS_DECL_ASYNCSTATEMENTCALLBACK
|
NS_DECL_ASYNCSTATEMENTCALLBACK
|
||||||
|
|
||||||
// This object implements a bookmark observer interface. This is called from the
|
// This object implements a bookmark observer interface. This is called from the
|
||||||
// result's actual observer and it knows all observers are FolderResultNodes
|
// result's actual observer and it knows all observers are FolderResultNodes
|
||||||
NS_DECL_NSINAVBOOKMARKOBSERVER
|
NS_DECL_NSINAVBOOKMARKOBSERVER
|
||||||
|
|
||||||
virtual void OnRemoving();
|
virtual void OnRemoving() MOZ_OVERRIDE;
|
||||||
|
|
||||||
// this indicates whether the folder contents are valid, they don't go away
|
// this indicates whether the folder contents are valid, they don't go away
|
||||||
// after the container is closed until a notification comes in
|
// after the container is closed until a notification comes in
|
||||||
|
@ -741,7 +741,7 @@ public:
|
||||||
|
|
||||||
nsresult FillChildren();
|
nsresult FillChildren();
|
||||||
void ClearChildren(bool aUnregister);
|
void ClearChildren(bool aUnregister);
|
||||||
nsresult Refresh();
|
nsresult Refresh() MOZ_OVERRIDE;
|
||||||
|
|
||||||
bool StartIncrementalUpdate();
|
bool StartIncrementalUpdate();
|
||||||
void ReindexRange(int32_t aStartIndex, int32_t aEndIndex, int32_t aDelta);
|
void ReindexRange(int32_t aStartIndex, int32_t aEndIndex, int32_t aDelta);
|
||||||
|
|
|
@ -34,7 +34,7 @@ public:
|
||||||
mDeathGrip = this;
|
mDeathGrip = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SetLinkState(nsLinkState aState)
|
virtual void SetLinkState(nsLinkState aState) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
// Notify our callback function.
|
// Notify our callback function.
|
||||||
mHandler(aState);
|
mHandler(aState);
|
||||||
|
@ -43,7 +43,7 @@ public:
|
||||||
mDeathGrip = 0;
|
mDeathGrip = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
|
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
return 0; // the value shouldn't matter
|
return 0; // the value shouldn't matter
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,7 @@ public:
|
||||||
|
|
||||||
NS_IMETHOD Observe(nsISupports* aSubject,
|
NS_IMETHOD Observe(nsISupports* aSubject,
|
||||||
const char* aTopic,
|
const char* aTopic,
|
||||||
const char16_t* aData)
|
const char16_t* aData) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
mTopicReceived = true;
|
mTopicReceived = true;
|
||||||
nsCOMPtr<nsIObserverService> observerService =
|
nsCOMPtr<nsIObserverService> observerService =
|
||||||
|
@ -394,7 +394,7 @@ public:
|
||||||
|
|
||||||
NS_IMETHOD Observe(nsISupports* aSubject,
|
NS_IMETHOD Observe(nsISupports* aSubject,
|
||||||
const char* aTopic,
|
const char* aTopic,
|
||||||
const char16_t* aData)
|
const char16_t* aData) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIObserverService> os =
|
nsCOMPtr<nsIObserverService> os =
|
||||||
do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
|
do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
|
||||||
|
|
|
@ -75,7 +75,7 @@ public:
|
||||||
|
|
||||||
NS_IMETHOD Observe(nsISupports* aSubject,
|
NS_IMETHOD Observe(nsISupports* aSubject,
|
||||||
const char* aTopic,
|
const char* aTopic,
|
||||||
const char16_t* aData)
|
const char16_t* aData) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
mVisits++;
|
mVisits++;
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ namespace test_observer_topic_dispatched_helpers {
|
||||||
|
|
||||||
NS_IMETHOD Observe(nsISupports* aSubject,
|
NS_IMETHOD Observe(nsISupports* aSubject,
|
||||||
const char* aTopic,
|
const char* aTopic,
|
||||||
const char16_t* aData)
|
const char16_t* aData) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
// Make sure we got notified of the right topic.
|
// Make sure we got notified of the right topic.
|
||||||
do_check_false(strcmp(aTopic, URI_VISITED_RESOLUTION_TOPIC));
|
do_check_false(strcmp(aTopic, URI_VISITED_RESOLUTION_TOPIC));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче