From ff1971b15493970dcfbd0ac8ddb81b22b02470b1 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 6 Jan 2015 15:10:56 -0500 Subject: [PATCH] Bug 1118413 - Mark virtual overridden functions as MOZ_OVERRIDE in places; r=mak --- toolkit/components/places/Helpers.h | 4 +- toolkit/components/places/History.cpp | 16 +-- .../places/nsAnnoProtocolHandler.cpp | 8 +- toolkit/components/places/nsNavBookmarks.h | 10 +- .../components/places/nsNavHistoryResult.h | 122 +++++++++--------- .../components/places/tests/cpp/mock_Link.h | 4 +- .../places/tests/cpp/places_test_harness.h | 4 +- .../places/tests/cpp/test_IHistory.cpp | 4 +- 8 files changed, 86 insertions(+), 86 deletions(-) diff --git a/toolkit/components/places/Helpers.h b/toolkit/components/places/Helpers.h index 8b0117cb50a..b343a7926f4 100644 --- a/toolkit/components/places/Helpers.h +++ b/toolkit/components/places/Helpers.h @@ -39,8 +39,8 @@ protected: * methods this class assumes silent or notreached. */ #define NS_DECL_ASYNCSTATEMENTCALLBACK \ - NS_IMETHOD HandleResult(mozIStorageResultSet *); \ - NS_IMETHOD HandleCompletion(uint16_t); + NS_IMETHOD HandleResult(mozIStorageResultSet *) MOZ_OVERRIDE; \ + NS_IMETHOD HandleCompletion(uint16_t) MOZ_OVERRIDE; /** * Utils to bind a specified URI (or URL) to a statement or binding params, at diff --git a/toolkit/components/places/History.cpp b/toolkit/components/places/History.cpp index a88e5562c37..f4456ceaa3f 100644 --- a/toolkit/components/places/History.cpp +++ b/toolkit/components/places/History.cpp @@ -518,7 +518,7 @@ public: // Note: the return value matters here. We call into this method, it's not // just xpcom boilerplate. - NS_IMETHOD Complete(nsresult aResult, nsISupports* aStatement) + NS_IMETHOD Complete(nsresult aResult, nsISupports* aStatement) MOZ_OVERRIDE { NS_ENSURE_SUCCESS(aResult, aResult); nsCOMPtr stmt = do_QueryInterface(aStatement); @@ -531,7 +531,7 @@ public: 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 // visit. @@ -539,14 +539,14 @@ public: 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 // make if an error occurred. return NS_OK; } - NS_IMETHOD HandleCompletion(uint16_t aReason) + NS_IMETHOD HandleCompletion(uint16_t aReason) MOZ_OVERRIDE { if (aReason != mozIStorageStatementCallback::REASON_FINISHED) { return NS_OK; @@ -1474,13 +1474,13 @@ public: 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. 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. nsCOMPtr destinationFileURL = do_QueryInterface(mDestination); @@ -1542,7 +1542,7 @@ public: return NS_OK; } - NS_IMETHOD HandleCompletion() + NS_IMETHOD HandleCompletion() MOZ_OVERRIDE { return NS_OK; } @@ -2033,7 +2033,7 @@ public: 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)) return NS_OK; mReadOnlyDBConn = do_QueryInterface(aConnection); diff --git a/toolkit/components/places/nsAnnoProtocolHandler.cpp b/toolkit/components/places/nsAnnoProtocolHandler.cpp index 40c5e6d8609..5148bab46ff 100644 --- a/toolkit/components/places/nsAnnoProtocolHandler.cpp +++ b/toolkit/components/places/nsAnnoProtocolHandler.cpp @@ -91,7 +91,7 @@ public: ////////////////////////////////////////////////////////////////////////////// //// 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. nsCOMPtr row; @@ -142,7 +142,7 @@ public: return NS_OK; } - NS_IMETHOD HandleCompletion(uint16_t aReason) + NS_IMETHOD HandleCompletion(uint16_t aReason) MOZ_OVERRIDE { if (!mReturnDefaultIcon) return mOutputStream->Close(); @@ -168,12 +168,12 @@ public: ////////////////////////////////////////////////////////////////////////////// //// nsIRequestObserver - NS_IMETHOD OnStartRequest(nsIRequest *, nsISupports *) + NS_IMETHOD OnStartRequest(nsIRequest *, nsISupports *) MOZ_OVERRIDE { 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. (void)mOutputStream->Close(); diff --git a/toolkit/components/places/nsNavBookmarks.h b/toolkit/components/places/nsNavBookmarks.h index 4e9bf1769a0..6aeef4e66a5 100644 --- a/toolkit/components/places/nsNavBookmarks.h +++ b/toolkit/components/places/nsNavBookmarks.h @@ -367,7 +367,7 @@ private: NS_DECL_ISUPPORTS - NS_IMETHOD DoTransaction() { + NS_IMETHOD DoTransaction() MOZ_OVERRIDE { nsNavBookmarks* bookmarks = nsNavBookmarks::GetBookmarksService(); NS_ENSURE_TRUE(bookmarks, NS_ERROR_OUT_OF_MEMORY); BookmarkData folder; @@ -382,7 +382,7 @@ private: return bookmarks->RemoveItem(mID); } - NS_IMETHOD UndoTransaction() { + NS_IMETHOD UndoTransaction() MOZ_OVERRIDE { nsNavBookmarks* bookmarks = nsNavBookmarks::GetBookmarksService(); NS_ENSURE_TRUE(bookmarks, NS_ERROR_OUT_OF_MEMORY); int64_t newFolder; @@ -390,16 +390,16 @@ private: &mIndex, EmptyCString(), &newFolder); } - NS_IMETHOD RedoTransaction() { + NS_IMETHOD RedoTransaction() MOZ_OVERRIDE { return DoTransaction(); } - NS_IMETHOD GetIsTransient(bool* aResult) { + NS_IMETHOD GetIsTransient(bool* aResult) MOZ_OVERRIDE { *aResult = false; return NS_OK; } - NS_IMETHOD Merge(nsITransaction* aTransaction, bool* aResult) { + NS_IMETHOD Merge(nsITransaction* aTransaction, bool* aResult) MOZ_OVERRIDE { *aResult = false; return NS_OK; } diff --git a/toolkit/components/places/nsNavHistoryResult.h b/toolkit/components/places/nsNavHistoryResult.h index 97e62a97a76..68fafa3402c 100644 --- a/toolkit/components/places/nsNavHistoryResult.h +++ b/toolkit/components/places/nsNavHistoryResult.h @@ -60,41 +60,41 @@ private: // Declare methods for implementing nsINavBookmarkObserver // 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_IMETHOD OnTitleChanged(nsIURI* aURI, const nsAString& aPageTitle, \ - const nsACString& aGUID); \ + const nsACString& aGUID) __VA_ARGS__; \ NS_IMETHOD OnFrecencyChanged(nsIURI* aURI, int32_t aNewFrecency, \ const nsACString& aGUID, bool aHidden, \ - PRTime aLastVisitDate); \ - NS_IMETHOD OnManyFrecenciesChanged(); \ + PRTime aLastVisitDate) __VA_ARGS__; \ + NS_IMETHOD OnManyFrecenciesChanged() __VA_ARGS__; \ NS_IMETHOD OnDeleteURI(nsIURI *aURI, const nsACString& aGUID, \ - uint16_t aReason); \ - NS_IMETHOD OnClearHistory(); \ + uint16_t aReason) __VA_ARGS__; \ + NS_IMETHOD OnClearHistory() __VA_ARGS__; \ NS_IMETHOD OnPageChanged(nsIURI *aURI, uint32_t aChangedAttribute, \ const nsAString &aNewValue, \ - const nsACString &aGUID); \ + const nsACString &aGUID) __VA_ARGS__; \ NS_IMETHOD OnDeleteVisits(nsIURI* aURI, PRTime aVisitTime, \ 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 // query nodes when the visited uri belongs to them. If no such query exists, // the history result creates a new query node dynamically. #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, \ int64_t aSessionId, int64_t aReferringId, \ uint32_t aTransitionType, const nsACString& aGUID, \ bool aHidden, uint32_t* aAdded); // The external version is used by results. -#define NS_DECL_BOOKMARK_HISTORY_OBSERVER_EXTERNAL \ - NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE \ +#define NS_DECL_BOOKMARK_HISTORY_OBSERVER_EXTERNAL(...) \ + NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE(__VA_ARGS__) \ NS_IMETHOD OnVisit(nsIURI* aURI, int64_t aVisitId, PRTime aTime, \ int64_t aSessionId, int64_t aReferringId, \ uint32_t aTransitionType, const nsACString& aGUID, \ - bool aHidden); + bool aHidden) __VA_ARGS__; // nsNavHistoryResult // @@ -122,7 +122,7 @@ public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS 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) 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 is overridded for lazy construction for some containers). #define NS_IMPLEMENT_SIMPLE_RESULTNODE \ - NS_IMETHOD GetTitle(nsACString& aTitle) \ + NS_IMETHOD GetTitle(nsACString& aTitle) MOZ_OVERRIDE \ { aTitle = mTitle; return NS_OK; } \ - NS_IMETHOD GetAccessCount(uint32_t* aAccessCount) \ + NS_IMETHOD GetAccessCount(uint32_t* aAccessCount) MOZ_OVERRIDE \ { *aAccessCount = mAccessCount; return NS_OK; } \ - NS_IMETHOD GetTime(PRTime* aTime) \ + NS_IMETHOD GetTime(PRTime* aTime) MOZ_OVERRIDE \ { *aTime = mTime; return NS_OK; } \ - NS_IMETHOD GetIndentLevel(int32_t* aIndentLevel) \ + NS_IMETHOD GetIndentLevel(int32_t* aIndentLevel) MOZ_OVERRIDE \ { *aIndentLevel = mIndentLevel; return NS_OK; } \ - NS_IMETHOD GetBookmarkIndex(int32_t* aIndex) \ + NS_IMETHOD GetBookmarkIndex(int32_t* aIndex) MOZ_OVERRIDE \ { *aIndex = mBookmarkIndex; return NS_OK; } \ - NS_IMETHOD GetDateAdded(PRTime* aDateAdded) \ + NS_IMETHOD GetDateAdded(PRTime* aDateAdded) MOZ_OVERRIDE \ { *aDateAdded = mDateAdded; return NS_OK; } \ - NS_IMETHOD GetLastModified(PRTime* aLastModified) \ + NS_IMETHOD GetLastModified(PRTime* aLastModified) MOZ_OVERRIDE \ { *aLastModified = mLastModified; return NS_OK; } \ - NS_IMETHOD GetItemId(int64_t* aId) \ + NS_IMETHOD GetItemId(int64_t* aId) MOZ_OVERRIDE \ { *aId = mItemId; return NS_OK; } // This is used by the base classes instead of @@ -232,17 +232,17 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsNavHistoryResult, NS_NAVHISTORYRESULT_IID) // buffer.) #define NS_FORWARD_COMMON_RESULTNODE_TO_BASE \ NS_IMPLEMENT_SIMPLE_RESULTNODE \ - NS_IMETHOD GetIcon(nsACString& aIcon) \ + NS_IMETHOD GetIcon(nsACString& aIcon) MOZ_OVERRIDE \ { return nsNavHistoryResultNode::GetIcon(aIcon); } \ - NS_IMETHOD GetParent(nsINavHistoryContainerResultNode** aParent) \ + NS_IMETHOD GetParent(nsINavHistoryContainerResultNode** aParent) MOZ_OVERRIDE \ { return nsNavHistoryResultNode::GetParent(aParent); } \ - NS_IMETHOD GetParentResult(nsINavHistoryResult** aResult) \ + NS_IMETHOD GetParentResult(nsINavHistoryResult** aResult) MOZ_OVERRIDE \ { return nsNavHistoryResultNode::GetParentResult(aResult); } \ - NS_IMETHOD GetTags(nsAString& aTags) \ + NS_IMETHOD GetTags(nsAString& aTags) MOZ_OVERRIDE \ { return nsNavHistoryResultNode::GetTags(aTags); } \ - NS_IMETHOD GetPageGuid(nsACString& aPageGuid) \ + NS_IMETHOD GetPageGuid(nsACString& aPageGuid) MOZ_OVERRIDE \ { return nsNavHistoryResultNode::GetPageGuid(aPageGuid); } \ - NS_IMETHOD GetBookmarkGuid(nsACString& aBookmarkGuid) \ + NS_IMETHOD GetBookmarkGuid(nsACString& aBookmarkGuid) MOZ_OVERRIDE \ { return nsNavHistoryResultNode::GetBookmarkGuid(aBookmarkGuid); } class nsNavHistoryResultNode : public nsINavHistoryResultNode @@ -258,16 +258,16 @@ public: NS_DECL_CYCLE_COLLECTION_CLASS(nsNavHistoryResultNode) NS_IMPLEMENT_SIMPLE_RESULTNODE - NS_IMETHOD GetIcon(nsACString& aIcon); - NS_IMETHOD GetParent(nsINavHistoryContainerResultNode** aParent); - NS_IMETHOD GetParentResult(nsINavHistoryResult** aResult); - NS_IMETHOD GetType(uint32_t* type) + NS_IMETHOD GetIcon(nsACString& aIcon) MOZ_OVERRIDE; + NS_IMETHOD GetParent(nsINavHistoryContainerResultNode** aParent) MOZ_OVERRIDE; + NS_IMETHOD GetParentResult(nsINavHistoryResult** aResult) MOZ_OVERRIDE; + NS_IMETHOD GetType(uint32_t* type) MOZ_OVERRIDE { *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; } - NS_IMETHOD GetTags(nsAString& aTags); - NS_IMETHOD GetPageGuid(nsACString& aPageGuid); - NS_IMETHOD GetBookmarkGuid(nsACString& aBookmarkGuid); + NS_IMETHOD GetTags(nsAString& aTags) MOZ_OVERRIDE; + NS_IMETHOD GetPageGuid(nsACString& aPageGuid) MOZ_OVERRIDE; + NS_IMETHOD GetBookmarkGuid(nsACString& aBookmarkGuid) MOZ_OVERRIDE; 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 // forward the rest to us using this macro #define NS_FORWARD_CONTAINERNODE_EXCEPT_HASCHILDREN \ - NS_IMETHOD GetState(uint16_t* _state) \ + NS_IMETHOD GetState(uint16_t* _state) MOZ_OVERRIDE \ { return nsNavHistoryContainerResultNode::GetState(_state); } \ - NS_IMETHOD GetContainerOpen(bool *aContainerOpen) \ + NS_IMETHOD GetContainerOpen(bool *aContainerOpen) MOZ_OVERRIDE \ { return nsNavHistoryContainerResultNode::GetContainerOpen(aContainerOpen); } \ - NS_IMETHOD SetContainerOpen(bool aContainerOpen) \ + NS_IMETHOD SetContainerOpen(bool aContainerOpen) MOZ_OVERRIDE \ { return nsNavHistoryContainerResultNode::SetContainerOpen(aContainerOpen); } \ - NS_IMETHOD GetChildCount(uint32_t *aChildCount) \ + NS_IMETHOD GetChildCount(uint32_t *aChildCount) MOZ_OVERRIDE \ { 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); } \ - NS_IMETHOD GetChildIndex(nsINavHistoryResultNode* aNode, uint32_t* _retval) \ + NS_IMETHOD GetChildIndex(nsINavHistoryResultNode* aNode, uint32_t* _retval) MOZ_OVERRIDE \ { return nsNavHistoryContainerResultNode::GetChildIndex(aNode, _retval); } \ NS_IMETHOD FindNodeByDetails(const nsACString& aURIString, PRTime aTime, \ int64_t aItemId, bool aRecursive, \ - nsINavHistoryResultNode** _retval) \ + nsINavHistoryResultNode** _retval) MOZ_OVERRIDE \ { return nsNavHistoryContainerResultNode::FindNodeByDetails(aURIString, aTime, aItemId, \ aRecursive, _retval); } @@ -436,15 +436,15 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsNavHistoryContainerResultNode, nsNavHistoryResultNode) 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; } - NS_IMETHOD GetUri(nsACString& aURI) + NS_IMETHOD GetUri(nsACString& aURI) MOZ_OVERRIDE { aURI = mURI; return NS_OK; } NS_DECL_NSINAVHISTORYCONTAINERRESULTNODE public: - virtual void OnRemoving(); + virtual void OnRemoving() MOZ_OVERRIDE; bool AreChildrenVisible(); @@ -631,20 +631,20 @@ public: NS_DECL_ISUPPORTS_INHERITED 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; } - 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_IMETHOD GetHasChildren(bool* aHasChildren); + NS_IMETHOD GetHasChildren(bool* aHasChildren) MOZ_OVERRIDE; NS_DECL_NSINAVHISTORYQUERYRESULTNODE bool CanExpand(); bool IsContainersQuery(); - virtual nsresult OpenContainer(); + virtual nsresult OpenContainer() MOZ_OVERRIDE; NS_DECL_BOOKMARK_HISTORY_OBSERVER_INTERNAL - virtual void OnRemoving(); + virtual void OnRemoving() MOZ_OVERRIDE; public: // this constructs lazily mURI from mQueries and mOptions, call @@ -667,12 +667,12 @@ public: nsresult FillChildren(); void ClearChildren(bool unregister); - nsresult Refresh(); + nsresult Refresh() MOZ_OVERRIDE; - virtual uint16_t GetSortType(); - virtual void GetSortingAnnotation(nsACString& aSortingAnnotation); + virtual uint16_t GetSortType() MOZ_OVERRIDE; + virtual void GetSortingAnnotation(nsACString& aSortingAnnotation) MOZ_OVERRIDE; virtual void RecursiveSort(const char* aData, - SortComparator aComparator); + SortComparator aComparator) MOZ_OVERRIDE; nsCOMPtr mRemovingURI; nsresult NotifyIfTagsChanged(nsIURI* aURI); @@ -704,7 +704,7 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_FORWARD_COMMON_RESULTNODE_TO_BASE - NS_IMETHOD GetType(uint32_t* type) { + NS_IMETHOD GetType(uint32_t* type) MOZ_OVERRIDE { if (mTargetFolderItemId != mItemId) { *type = nsNavHistoryResultNode::RESULT_TYPE_FOLDER_SHORTCUT; } else { @@ -712,21 +712,21 @@ public: } return NS_OK; } - NS_IMETHOD GetUri(nsACString& aURI); + NS_IMETHOD GetUri(nsACString& aURI) MOZ_OVERRIDE; NS_FORWARD_CONTAINERNODE_EXCEPT_HASCHILDREN - NS_IMETHOD GetHasChildren(bool* aHasChildren); + NS_IMETHOD GetHasChildren(bool* aHasChildren) MOZ_OVERRIDE; NS_DECL_NSINAVHISTORYQUERYRESULTNODE - virtual nsresult OpenContainer(); + virtual nsresult OpenContainer() MOZ_OVERRIDE; - virtual nsresult OpenContainerAsync(); + virtual nsresult OpenContainerAsync() MOZ_OVERRIDE; NS_DECL_ASYNCSTATEMENTCALLBACK // This object implements a bookmark observer interface. This is called from the // result's actual observer and it knows all observers are FolderResultNodes NS_DECL_NSINAVBOOKMARKOBSERVER - virtual void OnRemoving(); + virtual void OnRemoving() MOZ_OVERRIDE; // this indicates whether the folder contents are valid, they don't go away // after the container is closed until a notification comes in @@ -741,7 +741,7 @@ public: nsresult FillChildren(); void ClearChildren(bool aUnregister); - nsresult Refresh(); + nsresult Refresh() MOZ_OVERRIDE; bool StartIncrementalUpdate(); void ReindexRange(int32_t aStartIndex, int32_t aEndIndex, int32_t aDelta); diff --git a/toolkit/components/places/tests/cpp/mock_Link.h b/toolkit/components/places/tests/cpp/mock_Link.h index fdd0386cd59..a7243195ea2 100644 --- a/toolkit/components/places/tests/cpp/mock_Link.h +++ b/toolkit/components/places/tests/cpp/mock_Link.h @@ -34,7 +34,7 @@ public: mDeathGrip = this; } - virtual void SetLinkState(nsLinkState aState) + virtual void SetLinkState(nsLinkState aState) MOZ_OVERRIDE { // Notify our callback function. mHandler(aState); @@ -43,7 +43,7 @@ public: 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 } diff --git a/toolkit/components/places/tests/cpp/places_test_harness.h b/toolkit/components/places/tests/cpp/places_test_harness.h index 4fae57b678f..9fed828f52f 100644 --- a/toolkit/components/places/tests/cpp/places_test_harness.h +++ b/toolkit/components/places/tests/cpp/places_test_harness.h @@ -125,7 +125,7 @@ public: NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic, - const char16_t* aData) + const char16_t* aData) MOZ_OVERRIDE { mTopicReceived = true; nsCOMPtr observerService = @@ -394,7 +394,7 @@ public: NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic, - const char16_t* aData) + const char16_t* aData) MOZ_OVERRIDE { nsCOMPtr os = do_GetService(NS_OBSERVERSERVICE_CONTRACTID); diff --git a/toolkit/components/places/tests/cpp/test_IHistory.cpp b/toolkit/components/places/tests/cpp/test_IHistory.cpp index 351f92dc5d3..3501ee75b44 100644 --- a/toolkit/components/places/tests/cpp/test_IHistory.cpp +++ b/toolkit/components/places/tests/cpp/test_IHistory.cpp @@ -75,7 +75,7 @@ public: NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic, - const char16_t* aData) + const char16_t* aData) MOZ_OVERRIDE { mVisits++; @@ -329,7 +329,7 @@ namespace test_observer_topic_dispatched_helpers { NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic, - const char16_t* aData) + const char16_t* aData) MOZ_OVERRIDE { // Make sure we got notified of the right topic. do_check_false(strcmp(aTopic, URI_VISITED_RESOLUTION_TOPIC));