зеркало из https://github.com/mozilla/gecko-dev.git
Bug 327841 (also fixes 329110 and 321936) r=bryner. Implement failed favicon
cache in favicon service, update favicons for redirected bookmarks, don't load favicon data if we have a recent copy. Original committer: brettw%gmail.com Original revision: 1.3 Original date: 2006/03/03 18:48:37
This commit is contained in:
Родитель
29f6649364
Коммит
8d91d9eea4
|
@ -37,6 +37,7 @@
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
|
#include "nsDataHashtable.h"
|
||||||
#include "nsIFaviconService.h"
|
#include "nsIFaviconService.h"
|
||||||
#include "nsServiceManagerUtils.h"
|
#include "nsServiceManagerUtils.h"
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
|
@ -44,6 +45,9 @@
|
||||||
#include "mozIStorageValueArray.h"
|
#include "mozIStorageValueArray.h"
|
||||||
#include "mozIStorageStatement.h"
|
#include "mozIStorageStatement.h"
|
||||||
|
|
||||||
|
// forward definition for friend class
|
||||||
|
class FaviconLoadListener;
|
||||||
|
|
||||||
class nsFaviconService : public nsIFaviconService
|
class nsFaviconService : public nsIFaviconService
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -108,8 +112,16 @@ private:
|
||||||
*/
|
*/
|
||||||
nsCOMPtr<nsIURI> mDefaultIcon;
|
nsCOMPtr<nsIURI> mDefaultIcon;
|
||||||
|
|
||||||
|
PRUint32 mFailedFaviconSerial;
|
||||||
|
nsDataHashtable<nsCStringHashKey, PRUint32> mFailedFavicons;
|
||||||
|
|
||||||
nsresult SetFaviconUrlForPageInternal(nsIURI* aURI, nsIURI* aFavicon,
|
nsresult SetFaviconUrlForPageInternal(nsIURI* aURI, nsIURI* aFavicon,
|
||||||
PRBool* aHasData, PRTime* aExpiration);
|
PRBool* aHasData, PRTime* aExpiration);
|
||||||
|
|
||||||
|
nsresult UpdateBookmarkRedirectFavicon(nsIURI* aPage, nsIURI* aFavicon);
|
||||||
|
void SendFaviconNotifications(nsIURI* aPage, nsIURI* aFaviconURI);
|
||||||
|
|
||||||
|
friend class FaviconLoadListener;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FAVICON_DEFAULT_URL "chrome://browser/skin/places/defaultFavicon.png"
|
#define FAVICON_DEFAULT_URL "chrome://browser/skin/places/defaultFavicon.png"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче