Bug 1366920 - SafeBrowinsg V4 only in 56. r=francois

MozReview-Commit-ID: KWhPC7YWzAh

--HG--
extra : rebase_source : 7fd8bea46709d2eade501b1ce781857ccdc3f189
This commit is contained in:
DimiL 2017-06-14 09:56:27 +08:00
Родитель 27d3284709
Коммит c301aff125
4 изменённых файлов: 4 добавлений и 35 удалений

Просмотреть файл

@ -1690,10 +1690,8 @@ pref("extensions.formautofill.loglevel", "Warn");
pref("browser.sessionstore.restore_tabs_lazily", true);
// Enable safebrowsing v4 tables (suffixed by "-proto") update.
#ifdef NIGHTLY_BUILD
pref("urlclassifier.malwareTable", "goog-malware-shavar,goog-unwanted-shavar,goog-malware-proto,goog-unwanted-proto,test-malware-simple,test-unwanted-simple");
pref("urlclassifier.phishTable", "goog-phish-shavar,goog-phish-proto,test-phish-simple");
#endif
pref("urlclassifier.malwareTable", "goog-malware-proto,goog-unwanted-proto,test-malware-simple,test-unwanted-simple");
pref("urlclassifier.phishTable", "goog-phish-proto,test-phish-simple");
pref("browser.suppress_first_window_animation", true);

Просмотреть файл

@ -5210,13 +5210,8 @@ pref("urlclassifier.phishTable", "googpub-phish-shavar,test-phish-simple");
#endif
// Tables for application reputation.
#ifdef NIGHTLY_BUILD
pref("urlclassifier.downloadAllowTable", "goog-downloadwhite-digest256,goog-downloadwhite-proto");
pref("urlclassifier.downloadBlockTable", "goog-badbinurl-shavar,goog-badbinurl-proto");
#else
pref("urlclassifier.downloadAllowTable", "goog-downloadwhite-digest256");
pref("urlclassifier.downloadBlockTable", "goog-badbinurl-shavar");
#endif // NIGHTLY_BUILD
pref("urlclassifier.downloadAllowTable", "goog-downloadwhite-proto");
pref("urlclassifier.downloadBlockTable", "goog-badbinurl-proto");
pref("urlclassifier.disallow_completions", "test-malware-simple,test-phish-simple,test-unwanted-simple,test-track-simple,test-trackwhite-simple,test-block-simple,test-flashallow-simple,testexcept-flashallow-simple,test-flash-simple,testexcept-flash-simple,test-flashsubdoc-simple,testexcept-flashsubdoc-simple,goog-downloadwhite-digest256,base-track-digest256,mozstd-trackwhite-digest256,content-track-digest256,mozplugin-block-digest256,mozplugin2-block-digest256,block-flash-digest256,except-flash-digest256,allow-flashallow-digest256,except-flashallow-digest256,block-flashsubdoc-digest256,except-flashsubdoc-digest256,except-flashinfobar-digest256");
@ -5269,11 +5264,7 @@ pref("browser.safebrowsing.provider.google.reportMalwareMistakeURL", "https://%L
pref("browser.safebrowsing.provider.google4.pver", "4");
pref("browser.safebrowsing.provider.google4.lists", "goog-badbinurl-proto,goog-downloadwhite-proto,goog-phish-proto,googpub-phish-proto,goog-malware-proto,goog-unwanted-proto");
pref("browser.safebrowsing.provider.google4.updateURL", "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$ct=application/x-protobuf&key=%GOOGLE_API_KEY%&$httpMethod=POST");
#ifdef NIGHTLY_BUILD
pref("browser.safebrowsing.provider.google4.gethashURL", "https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_API_KEY%&$httpMethod=POST");
#else
pref("browser.safebrowsing.provider.google4.gethashURL", "");
#endif // NIGHTLY_BUILD
pref("browser.safebrowsing.provider.google4.reportURL", "https://safebrowsing.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
pref("browser.safebrowsing.provider.google4.reportPhishMistakeURL", "https://%LOCALE%.phish-error.mozilla.com/?hl=%LOCALE%&url=");
pref("browser.safebrowsing.provider.google4.reportMalwareMistakeURL", "https://%LOCALE%.malware-error.mozilla.com/?hl=%LOCALE%&url=");
@ -5320,12 +5311,6 @@ pref("browser.safebrowsing.id", "navclient-auto-ffox");
pref("browser.safebrowsing.id", "Firefox");
#endif
#ifdef NIGHTLY_BUILD
pref("browser.safebrowsing.temporary.take_v4_completion_result", true);
#else
pref("browser.safebrowsing.temporary.take_v4_completion_result", false);
#endif
// Turn off Spatial navigation by default.
pref("snav.enabled", false);

Просмотреть файл

@ -34,7 +34,6 @@ class TestSafeBrowsingInitialDownload(PuppeteerMixin, MarionetteTestCase):
prefs_provider_update_time = {
# Force an immediate download of the safebrowsing files
'browser.safebrowsing.provider.google4.nextupdatetime': 1,
'browser.safebrowsing.provider.google.nextupdatetime': 1,
'browser.safebrowsing.provider.mozilla.nextupdatetime': 1,
}

Просмотреть файл

@ -102,11 +102,6 @@ LazyLogModule gUrlClassifierDbServiceLog("UrlClassifierDbService");
// 30 minutes as the maximum negative cache duration.
#define MAXIMUM_NEGATIVE_CACHE_DURATION_SEC (30 * 60 * 1000)
// TODO: The following two prefs are to be removed after we
// roll out full v4 hash completion. See Bug 1331534.
#define TAKE_V4_COMPLETION_RESULT_PREF "browser.safebrowsing.temporary.take_v4_completion_result"
#define TAKE_V4_COMPLETION_RESULT_DEFAULT false
class nsUrlClassifierDBServiceWorker;
// Singleton instance.
@ -1290,14 +1285,6 @@ nsUrlClassifierLookupCallback::HandleResults()
continue;
}
if (StringEndsWith(result.mTableName, NS_LITERAL_CSTRING("-proto")) &&
!Preferences::GetBool(TAKE_V4_COMPLETION_RESULT_PREF,
TAKE_V4_COMPLETION_RESULT_DEFAULT)) {
// Bug 1331534 - We temporarily ignore hash completion result
// for v4 tables.
continue;
}
LOG(("Confirmed result %s from table %s",
result.PartialHashHex().get(), result.mTableName.get()));