30 #ifndef SBMETADATACRASHTRACKER_H_
31 #define SBMETADATACRASHTRACKER_H_
39 #include <nsAutoLock.h>
40 #include <nsStringGlue.h>
42 #include <nsCOMArray.h>
44 #include <nsAutoPtr.h>
45 #include <nsISupports.h>
46 #include <nsIOutputStream.h>
48 #include <nsDataHashtable.h>
108 nsresult
LogURLEnd(
const nsACString& aURL);
115 PRBool* aIsBlackListed);
131 nsresult ProcessExistingLog();
137 static PLDHashOperator PR_CALLBACK
138 AddURLsToBlacklist(nsCStringHashKey::KeyType aKey,
146 static PLDHashOperator PR_CALLBACK
147 WriteBlacklistURLToFile(nsCStringHashKey::KeyType aKey,
154 nsresult ReadBlacklist();
159 nsresult WriteBlacklist();
164 nsresult GetProfileFile(
const nsAString&
aName, nsIFile** aFile);
168 nsCOMPtr<nsIFile> mBlacklistFile;
169 nsDataHashtable<nsCStringHashKey, PRBool> mURLBlacklist;
174 nsDataHashtable<nsCStringHashKey, PRUint32> mURLToIndexMap;
176 nsCOMPtr<nsIFile> mLogFile;
177 nsCOMPtr<nsIOutputStream> mOutputStream;
181 nsCString mSimulateCrashURL;
184 #endif // SBMETADATACRASHTRACKER_H_