diff --git a/widget/windows/JumpListBuilder.cpp b/widget/windows/JumpListBuilder.cpp index 9e4cb5ce2365..461fffc48bf0 100644 --- a/widget/windows/JumpListBuilder.cpp +++ b/widget/windows/JumpListBuilder.cpp @@ -126,9 +126,6 @@ NS_IMETHODIMP JumpListBuilder::InitListBuild(nsIMutableArray *removedItems, bool IObjectArray *objArray; - // The returned objArray of removed items are for manually removed items. - // This does not return items which are removed because they were previously - // part of the jump list but are no longer part of the jump list. if (SUCCEEDED(mJumpListMgr->BeginList(&mMaxItems, IID_PPV_ARGS(&objArray)))) { if (objArray) { TransferIObjectArrayToIMutableArray(objArray, removedItems); @@ -382,12 +379,6 @@ NS_IMETHODIMP JumpListBuilder::AddListToBuild(int16_t aCatType, nsIArray *items, hr = mJumpListMgr->AppendCategory(reinterpret_cast(catName.BeginReading()), pArray); if (SUCCEEDED(hr)) *_retval = true; - - // Get rid of the old icons - nsCOMPtr event = - new mozilla::widget::AsyncDeleteAllFaviconsFromDisk(true); - mIOThread->Dispatch(event, NS_DISPATCH_NORMAL); - return NS_OK; } break; diff --git a/widget/windows/WinUtils.cpp b/widget/windows/WinUtils.cpp index baf4e5cfb937..0d5ca255a114 100644 --- a/widget/windows/WinUtils.cpp +++ b/widget/windows/WinUtils.cpp @@ -958,9 +958,7 @@ AsyncDeleteIconFromDisk::~AsyncDeleteIconFromDisk() { } -AsyncDeleteAllFaviconsFromDisk:: - AsyncDeleteAllFaviconsFromDisk(bool aIgnoreRecent) - : mIgnoreRecent(aIgnoreRecent) +AsyncDeleteAllFaviconsFromDisk::AsyncDeleteAllFaviconsFromDisk() { } @@ -999,24 +997,6 @@ NS_IMETHODIMP AsyncDeleteAllFaviconsFromDisk::Run() if (NS_FAILED(currFile->Exists(&exists)) || !exists) continue; - if (mIgnoreRecent) { - // Check to make sure the icon wasn't just recently created. - // If it was created recently, don't delete it yet. - int64_t fileModTime = 0; - rv = currFile->GetLastModifiedTime(&fileModTime); - fileModTime /= PR_MSEC_PER_SEC; - // If the icon is older than the regeneration time (+ 10 min to be - // safe), then it's old and we can get rid of it. - // This code is only hit directly after a regeneration. - int32_t icoNoDeleteSeconds = - FaviconHelper::GetICOCacheSecondsTimeout() + 600; - int64_t nowTime = PR_Now() / int64_t(PR_USEC_PER_SEC); - if (NS_FAILED(rv) || - (nowTime - fileModTime) < icoNoDeleteSeconds) { - continue; - } - } - // We found an ICO file that exists, so we should remove it currFile->Remove(false); } diff --git a/widget/windows/WinUtils.h b/widget/windows/WinUtils.h index 337029aa49f5..23d82b085ff2 100644 --- a/widget/windows/WinUtils.h +++ b/widget/windows/WinUtils.h @@ -411,10 +411,8 @@ public: NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIRUNNABLE - AsyncDeleteAllFaviconsFromDisk(bool aIgnoreRecent = false); + AsyncDeleteAllFaviconsFromDisk(); virtual ~AsyncDeleteAllFaviconsFromDisk(); -private: - bool mIgnoreRecent; }; class FaviconHelper