зеркало из https://github.com/mozilla/pjs.git
Bug 412204 - anti virus scanning is slow and unnecessary. r=jimm
This commit is contained in:
Родитель
c8ef4f7e77
Коммит
6854546d37
|
@ -232,6 +232,7 @@ pref("browser.download.manager.focusWhenStarting", false);
|
|||
pref("browser.download.manager.flashCount", 2);
|
||||
pref("browser.download.manager.addToRecentDocs", true);
|
||||
pref("browser.download.manager.quitBehavior", 0);
|
||||
pref("browser.download.manager.scanWhenDone", true);
|
||||
|
||||
// search engines URL
|
||||
pref("browser.search.searchEnginesURL", "https://%LOCALE%.add-ons.mozilla.com/%LOCALE%/firefox/%VERSION%/search-engines/");
|
||||
|
|
|
@ -96,6 +96,7 @@
|
|||
#define PREF_BDM_QUITBEHAVIOR "browser.download.manager.quitBehavior"
|
||||
#define PREF_BDM_CLOSEWHENDONE "browser.download.manager.closeWhenDone"
|
||||
#define PREF_BDM_ADDTORECENTDOCS "browser.download.manager.addToRecentDocs"
|
||||
#define PREF_BDM_SCANWHENDONE "browser.download.manager.scanWhenDone"
|
||||
#define PREF_BH_DELETETEMPFILEONEXIT "browser.helperApps.deleteTempFileOnExit"
|
||||
|
||||
static const PRInt64 gUpdateInterval = 400 * PR_USEC_PER_MSEC;
|
||||
|
@ -2130,7 +2131,15 @@ nsDownload::OnStateChange(nsIWebProgress *aWebProgress,
|
|||
mLastUpdate = PR_Now();
|
||||
|
||||
#if defined(XP_WIN) && !defined(__MINGW32__)
|
||||
(void)SetState(nsIDownloadManager::DOWNLOAD_SCANNING);
|
||||
PRBool scan = PR_TRUE;
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (prefs)
|
||||
(void)prefs->GetBoolPref(PREF_BDM_SCANWHENDONE, &scan);
|
||||
|
||||
if (scan)
|
||||
(void)SetState(nsIDownloadManager::DOWNLOAD_SCANNING);
|
||||
else
|
||||
(void)SetState(nsIDownloadManager::DOWNLOAD_FINISHED);
|
||||
#else
|
||||
(void)SetState(nsIDownloadManager::DOWNLOAD_FINISHED);
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче