Граф коммитов

1316 Коммитов

Автор SHA1 Сообщение Дата
Chris Peterson a0c8081df4 Bug 870698 - Part 4: Replace Equals("") with EqualsLiteral(""). r=erahm
MozReview-Commit-ID: G1GhyvD29WK

--HG--
extra : rebase_source : 115842c37a40041bdca7b4e1ff0a5680b02ced15
extra : source : 90bfff9c01d80086cdc17637f310e898fea295ea
2017-09-06 01:13:45 -07:00
Chris Peterson 45aa2a8e8e Bug 870698 - Part 2: Replace Append("") with AppendLiteral(""). r=erahm
MozReview-Commit-ID: CrkIP4iHP1U

--HG--
extra : rebase_source : 5dc4e91a3f1860773c199f1abf3f66479218834a
extra : intermediate-source : ba51cc79847f2b43ba616f4a5d2bbc6958ca9f6d
extra : source : 1fda2fa990cc918c748ffa14fcc5dbe13fe3bdc3
2017-09-03 22:14:11 -07:00
Prathiksha 86d7bac5f6 Bug 1363051 - Update about:blocked page visuals and copy. r=francois,johannh
MozReview-Commit-ID: CK2cO5Ikivt

--HG--
extra : rebase_source : 01da86303c4aa20961be609c7f45db39bf7e9f7b
2017-09-04 19:25:05 +05:30
Thomas Nguyen e70d76485c Bug 1394031 - Remove mCryptoHash members of nsUrlClassifierDBServiceWorker and ProtocolParser
The usage of cryptoHash consists of a complete set of Init, Update, and Finish, there's
no reason to keep it around

MozReview-Commit-ID: 7bT9IsWEM5m
2017-09-14 10:51:55 +08:00
Andrew McCreight bfd580fb71 Bug 1186409 - Use Cu.getGlobalForObject when importing properties off a JSM global. r=kmag
With JSM global sharing, the object returned by Cu.import() is a
NonSyntacticVariablesObject, rather than a global. Various code tries
to use properties from a JSM global via an import.

Cu.importGlobalProperties can also be used in some places.

MozReview-Commit-ID: HudCXO2GKN0

--HG--
extra : rebase_source : 6b5fa6f5509397504cb461a761f6cc2399f18c40
2017-06-23 13:51:14 -07:00
Thomas Nguyen a8c2c418b0 Bug 1397231 - Skip new URLClassifierLocalChild when ContentChild is shutting down r=Ehsan
MozReview-Commit-ID: HRv5DpiPwmB

--HG--
extra : rebase_source : d5ffe6d1f9520a9031e9c5112e1bc424cf366407
2017-09-07 16:16:43 +08:00
Thomas Nguyen dd42019824 Bug 1385609 - Fix backoff issue that makes SB lists no longer update r=francois
The issue occurs when nsITimer is fired earlier than the backoff time. In that
case, the update doesn't proceed and we never make another attempt because the
backoff update timer was oneshot.

We fix the issue in two ways:

- Add a tolerance of 1 second in case the timer fires too early.
- Set another oneshot timer whenever we are prevented from updating due to
backoff.

MozReview-Commit-ID: E2ogNRsHJVK

--HG--
extra : rebase_source : c81fa77934f6c39e1c5d07b19785a01546e02542
2017-08-30 18:04:10 +08:00
Sebastian Hengst 34e6bbd998 Backed out changeset 14b4af261515 (bug 1385609) for eslint failures in nsUrlClassifierLib.js. r=backout 2017-09-05 19:04:43 +02:00
Thomas Nguyen 9088e7a39b Bug 1395411 - Unregister tables when they're removed from urlclassifier.*Table. r=francois
MozReview-Commit-ID: Ex1ZxMcJLep

--HG--
extra : rebase_source : a200c02b536874a5a4255087b42d7074f5de3b43
2017-08-31 18:46:23 +08:00
Thomas Nguyen a26ed706a3 Bug 1385609 - Fix backoff issue that makes SB lists no longer update r=francois
The issue occurs when nsITimer is fired earlier than the backoff time. In that
case, the update doesn't proceed and we never make another attempt because the
backoff update timer was oneshot.

We fix the issue in two ways:

- Add a tolerance of 1 second in case the timer fires too early.
- Set another oneshot timer whenever we are prevented from updating due to
backoff.

MozReview-Commit-ID: E2ogNRsHJVK

--HG--
extra : rebase_source : 17aa70d8583cc84e28e57410de66eaac63bd18bb
2017-08-30 18:04:10 +08:00
Sebastian Hengst 2283a8f642 Backed out changeset 7bb00f5e0120 (bug 1395411) for eslint failures in test_classifier_changetablepref_bug1395411.html: 'classifierHelper' is not defined. r=backout 2017-09-04 16:45:35 +02:00
Thomas Nguyen d46c8b2c9d Bug 1395411 - Unregister tables when they're removed from urlclassifier.*Table. r=francois
MozReview-Commit-ID: Ex1ZxMcJLep

--HG--
extra : rebase_source : ceb099b7132ef0167c75b111bf3105714ae8ee92
2017-08-31 18:46:23 +08:00
Thomas Nguyen 1f57fdb85d Bug 1345058 - Asynchronously decide if a flash document should be blocked. r=baku
MozReview-Commit-ID: K91cSvIdOrb

--HG--
extra : rebase_source : 4d91ab3499c0124129e74a054c5cc78882ff351e
2017-08-14 14:05:23 +08:00
Steve Armand c94baecadb Bug 1343843 - Remove unused chrome://global/content/url-classifier/unittests.xul. r=standard8
MozReview-Commit-ID: IMiDbyPu5n9

--HG--
extra : rebase_source : 69c6a17e95a9582d7541b1c25993ec418bdc9d63
2017-09-01 23:31:57 -04:00
Francois Marier 530db90579 Bug 1395733 - Ensure the default value of urlclassifier.malwareTable is always sorted. r=gcp
MozReview-Commit-ID: 10M2ZpDyAI9

--HG--
extra : rebase_source : 4523a0a1fd3adbdc8f0c13676548409ee9536f06
2017-08-31 14:54:11 -07:00
Francois Marier 99cb2b5a18 Bug 1394601 - Log an error when the Google API key is missing during Safe Browsing initialization. r=gcp
MozReview-Commit-ID: DNwa9lR0J6K

--HG--
extra : rebase_source : 0a547c0cf88e1ed09268cbb810abaaca09e98531
2017-08-28 17:06:00 -07:00
Eric Rahm 9398bd6f43 Bug 1393235 - Fix improper usages of string functions. r=njn
This fixes usages of `Find`, `RFind` and the equality operator that kind of
work right now but will break with the proper type checking of a templatized
version of the string classes.

For `Find` and `RFind` it appears that `nsCString::(R)Find("foo", 0)` calls
were being coerced to the `Find(char*, bool, int, int)` versions. The intent was
probably to just start searching from position zero.

For the equality operator, the type of nullptr is nullptr_t rather than
char(16_t)* so we'd need to add an operator overload that takes nullptr_t. In
this case just using `IsVoid` is probably more appropriate.

--HG--
extra : rebase_source : 50f78519084012ca669da0a211c489520c11d6b6
2017-08-22 19:30:46 -07:00
Francois Marier a014fe4f74 Bug 1388574 - Use the correct pref to gate the Application Reputation lists. r=hchang
MozReview-Commit-ID: 1ZuxnbgsOMX

--HG--
extra : rebase_source : 4984101882f1cfc16d07df78752c1a5aa18fadb4
2017-08-23 13:40:50 -07:00
Thomas Nguyen 9d1887c28c Bug 1363038 - Remove synchronous dispatch when worker is racing against shutdown r=hchang
MozReview-Commit-ID: JOkOukz1fov

--HG--
extra : rebase_source : 9e4204cebcd4615078019a51818250ff8125efe1
2017-08-22 14:51:44 +08:00
Henry Chang ed11934666 Bug 1392204 - Disable goog-badbinurl-proto and goog-downloadwhite-proto on Fennec. r=francois
Version 4 of the Google Safe Browsing server will return a 404 if any of the
application reputation lists are requested on Android. As a result, we should
avoid these threat types from being sent along with ANDROID_PLATFORM.

MozReview-Commit-ID: 6TUBVxe455y

--HG--
extra : rebase_source : dee095c008f4d328f359c66d20f0cc2dfcd109f3
extra : source : 5d6338807c6b21b7672236cac01b13bd75155225
2017-08-22 12:20:57 +08:00
Francois Marier adc9339128 Bug 1385484 - Add the login reputation whitelist behind a pref. r=hchang
MozReview-Commit-ID: Dbtl3WL5tMJ

--HG--
extra : rebase_source : d56e3db985865d0b513184d8ad41e2b750e7733e
2017-08-08 16:23:10 -07:00
Francois Marier 6fcbb94e82 Bug 1385484 - Cleanup Safe Browsing prefs and sync the download protection setting. r=hchang
MozReview-Commit-ID: B42p2Gw8y9i

--HG--
extra : rebase_source : ecc00c8251814783bbe5e9ea911ad034a9a3a9b0
2017-08-08 15:52:29 -07:00
Wes Kocher 207dd28c61 Backed out 4 changesets (bug 1385484) for build failures a=backout
Backed out changeset 401c2744f16b (bug 1385484)
Backed out changeset 2ff443a0c744 (bug 1385484)
Backed out changeset 1a1c476a9aaa (bug 1385484)
Backed out changeset 87ec064a3681 (bug 1385484)

MozReview-Commit-ID: D9WGXiXaNoZ

--HG--
extra : rebase_source : ebab6135905e972abf7eeab9af8db41454687373
2017-08-22 17:22:41 -07:00
Francois Marier 542d943dc4 Bug 1385484 - Add the login reputation whitelist behind a pref. r=hchang
MozReview-Commit-ID: Dbtl3WL5tMJ

--HG--
extra : rebase_source : 8f163e6871559a36e02b2c576970b4f1624da3b4
2017-08-08 16:23:10 -07:00
Francois Marier 7a9673e542 Bug 1385484 - Cleanup Safe Browsing prefs and sync the download protection setting. r=hchang
MozReview-Commit-ID: B42p2Gw8y9i

--HG--
extra : rebase_source : ecc00c8251814783bbe5e9ea911ad034a9a3a9b0
2017-08-08 15:52:29 -07:00
Nicholas Nethercote 8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Henry Chang 4950f839d2 Bug 1388582 - Skip unsupported threat types on current platform while making v4 request. r=francois
MozReview-Commit-ID: FTmOMQ339ZL

--HG--
extra : rebase_source : ea41ae42dc2faa9bab040018b4ee3a1ade49ed69
2017-08-16 15:30:20 +08:00
Thomas Nguyen da4b88ee61 Bug 1376410 - Handle OOM when appending prefix to map r=francois,hchang
MozReview-Commit-ID: 7MOHHAgEI1I

--HG--
extra : rebase_source : a46bbac722e331ad43e18aad4ee446676fddbfa1
2017-08-11 17:28:40 +08:00
Nicholas Nethercote 025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Dan Banner 42c8241ce0 Bug 1386684 - Enable ESLint for toolkit/components/url-classifier (manual fixes). r=hchang
MozReview-Commit-ID: JH1XDFMVd43

--HG--
extra : rebase_source : 41c83027c09e3071d3ddb929a01b5dd689109115
2017-08-02 20:09:14 +01:00
Dan Banner 436f06fda4 Bug 1386684 - Enable ESLint for toolkit/components/url-classifier (automatic fixes). r=hchang
MozReview-Commit-ID: F0Z8dRaYOku

--HG--
extra : rebase_source : 3ebc9ab6ea9f1741d8a986c9217575644411e2a1
2017-08-02 16:12:07 +01:00
Henry Chang 4a3106b91e Bug 1375277 - Test case for new error code NS_ERROR_HARMFUL_URI. r=francois
The test is based on "test-harmful-simple" so we can add testing entries
in a human-readable way.

MozReview-Commit-ID: IJcYrp04uFs

--HG--
extra : rebase_source : afc4329af4cd5fc31a783a8f0f2e3a4bdcb2a432
extra : source : 55a2e275514d2154a23a656e48f685cc6032e5c3
2017-07-28 17:38:01 +08:00
Henry Chang a93f3d2ba4 Bug 1375277 - Move Safe Browsing UI events to a separate telemetry probe. r=francois
MozReview-Commit-ID: KDAklsznekw

--HG--
extra : rebase_source : 20d81369b18b12d9b5f6670d92bf3c7215c8c9a9
extra : intermediate-source : a2d99a6b07bb015f0bdc5c1687e250086ed09a5c
extra : source : 5460dbfebee4f99580b306a9b0ec754b890f5959
2017-08-02 14:01:44 +08:00
Henry Chang af3b11c151 Bug 1375277 - New safebrowsing threat type "POTENTIALLY_HARMFUL_APPLICATION" introduced by v4. r=francois
As our threattype-listname conversion design, "goog-harmful-proto" is allocated
for this new threat type. This threat type is mainly for mobile.

MozReview-Commit-ID: G9GbgmHHHfp

--HG--
extra : rebase_source : 0681fcd9322b94451a86eafe57bf1ccc4b89db30
extra : intermediate-source : 28b0502d9add81beeae58a2c33f9fd5839d4d544
extra : source : 646f02f15131aa98ad37015b0a641304a3271796
2017-07-27 15:37:57 +08:00
Masatoshi Kimura 06311d2e3a Bug 1375125 - Remove nsILocalFile. r=froydnj
MozReview-Commit-ID: 6oU6Ya5UXtC

--HG--
extra : rebase_source : 55b6e30aa348c1b939326698b0da7d72c26b479c
2017-08-05 09:43:49 +09:00
Masatoshi Kimura 8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Masatoshi Kimura f143125cc2 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G

--HG--
extra : rebase_source : e8c9eb03468c075b79013b6e0bd8b367229c24cd
2017-07-29 20:50:21 +09:00
Francois Marier 2286e70d51 Bug 1386013 - Log an error when Safe Browsing times out. r=hchang
MozReview-Commit-ID: A99ov9T7rtm

--HG--
extra : rebase_source : d7fd2e8a1ebdc3f9b1c9d1ecd7bec33c6deb27d3
2017-07-31 20:29:25 -07:00
Nicholas Nethercote 581214bd8b Bug 1384835 (part 1, attempt 2) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
--HG--
extra : rebase_source : fe566945a55c281d8290634a5b55bed19415c839
2017-07-31 10:52:51 +10:00
Thomas Nguyen fe3447a3c5 Bug 1366384 - Add Advisory test on Safe Browsing warning page r=francois
MozReview-Commit-ID: C0c7GRj1qJo

--HG--
extra : rebase_source : 5d110f5a9a9a8de70862a0722da57b7e894299b6
2017-07-27 15:11:00 +08:00
Carsten "Tomcat" Book d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Wes Kocher ad35031103 Merge m-c to inbound, a=merge
MozReview-Commit-ID: LhiAcCiFBus
2017-07-26 18:33:18 -07:00
Thomas Nguyen 0ed363ec89 Bug 1381718 : Dump request when receiving 400 error r=hchang
MozReview-Commit-ID: 1ZFOIRTryiV

--HG--
extra : rebase_source : b0377d006b1b190c4a77ca4b26ce9d12efc0c464
2017-07-25 14:43:11 +08:00
Thomas Nguyen 7e59091f92 Bug 1378680 - Refactor usage fallible alloc in url-classifier r=francois
MozReview-Commit-ID: HHG1ByeIwZv

--HG--
extra : rebase_source : 1b025edaac49ee202b9a10cd2f2589acb587649b
2017-07-20 16:20:27 +08:00
Bevis Tseng 95b18d794e Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm
--HG--
extra : rebase_source : 84de1abfcc30a6964144c2e6718a508c71027b65
2017-07-27 02:18:20 +08:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Marco Castelluccio 7d7e1aa6a3 Bug 1384040 - Stop using preprocessor in nsUrlClassifierLib.js and nsUrlClassifierListManager.js, by directly copying the contents of the files they were including. r=francois
--HG--
extra : rebase_source : 8a725b6cce04594eb570e65804b320890d160f91
2017-07-26 01:24:09 +02:00
Sylvestre Ledru 7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Andrea Marchesini 50f9ea47a3 Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
Thomas Nguyen 32b3145839 Bug 1377559 - Should store value of preference browser.safebrowsing.debug to reuse r=francois
MozReview-Commit-ID: 1yWe7wB0ARl

--HG--
extra : rebase_source : eed70f5a7c1ad38e8ec24a86c8f606d9a5ba3e2a
2017-07-04 16:36:31 +08:00
Wes Kocher 19d135c982 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 4R4GFHPiij
2017-07-06 16:19:38 -07:00
Wes Kocher bbb26fe90e Merge inbound to central, a=merge
MozReview-Commit-ID: 2nFzji7su8C
2017-07-06 16:10:49 -07:00
Nathan Froyd a7e99ae521 Bug 1378387 - use dependent strings in the url-classifier where possible; r=gcp
Doing this makes various operations more efficient, as we don't have to
allocate, copy strings, and deallocate needlessly.  The remaining
instances of nsCString temporaries are in logging code, which didn't
seem worthwhile to deal with here.
2017-07-06 15:26:12 -04:00
Thomas Nguyen 4909ab1a70 Bug 1363882 - Remove casting address of inactive member union result.hash r=francois
MozReview-Commit-ID: 3pVaVJ1EJZu

--HG--
extra : rebase_source : 6549a5f1d303363cfb472753c3fe256c3d1dd740
2017-07-05 17:21:01 +08:00
Thomas Nguyen 62625fef28 Bug 1297614 - Refactor and remove dead code in toolkit/components/url-classifier/content r=francois
MozReview-Commit-ID: GzVGS1ZTRGL

--HG--
extra : rebase_source : ee868b5fb590f4965b17535383327df98504e963
2017-06-30 13:31:03 -07:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Carsten "Tomcat" Book 4e00eff077 merge mozilla-inbound to mozilla-central a=merge 2017-06-27 10:56:41 +02:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Francois Marier 9f3d9fa798 Bug 1376024 - Whitelist more known Safe Browsing providers for telemetry purposes. r=dimi
MozReview-Commit-ID: 6Dd1eDSJlzT

--HG--
extra : rebase_source : 3ffc44da6676e5cac993d7bdab12c821e995f1ca
2017-06-23 17:00:45 -07:00
Carsten "Tomcat" Book 259377b6ab merge mozilla-inbound to mozilla-central a=merge 2017-06-26 13:25:51 +02:00
DimiL 9814af0253 Bug 1335943 - Use the right origin attribute in Safe Browsing completions. r=francois
MozReview-Commit-ID: 8HQHzuwE5Cf

--HG--
extra : rebase_source : d6c57eb6b4d16898ca0f067052d8e9064c24c3a5
2017-06-21 17:27:22 +08:00
Florian Quèze 2924991bf6 Bug 1368456 - remove Promise.jsm imports in tests, r=mconley. 2017-06-23 11:25:52 +02:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Felipe Gomes a45c6fd314 Bug 1374731 - Don't use hardcoded test entries for the Flash classification tables. r=bytesized
MozReview-Commit-ID: 1pG11W7PX4R

--HG--
extra : rebase_source : a4c77e4b09a78f515d1485c6ef95cf81f27ee783
2017-06-20 18:15:44 -03:00
Carsten "Tomcat" Book de892834ed Merge mozilla-central to mozilla-inbound 2017-06-20 11:31:34 +02:00
Henry Chang 3931a09857 Bug 1370585 - Periodically check the flag (at most 30 seconds) rather than checking only once. r=francois
MozReview-Commit-ID: BjGN7nOCmTS

--HG--
extra : rebase_source : f6d7362048b7dc58110b099dcdc3d514ed9cd197
2017-06-19 18:25:12 +08:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Bevis Tseng d1637b9c5a Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
DimiL c301aff125 Bug 1366920 - SafeBrowinsg V4 only in 56. r=francois
MozReview-Commit-ID: KWhPC7YWzAh

--HG--
extra : rebase_source : 7fd8bea46709d2eade501b1ce781857ccdc3f189
2017-06-14 09:56:27 +08:00
DimiL 0f52e93b04 Bug 1373121 - about:url-classifier: Support get back-off time. r=francois
MozReview-Commit-ID: 6Q83TOo7jHK

--HG--
extra : rebase_source : b2cf6e8952cde7097caf6054946c86308f8d2c31
2017-06-15 11:41:13 +08:00
DimiL 5fb8503858 Bug 1312888 - Fix incorrect debug output for V2 lists. r=hchang
MozReview-Commit-ID: A6tb38RnUN3

--HG--
extra : rebase_source : 1d27102f0700a6443ee33c1ec6458fafd20d0d63
2017-06-14 15:32:53 +08:00
DimiL e218041b0a Bug 1329366 - Avoid the reuse of the same chunk numbers in classifierHelper.js. r=francois
This patch includes following fix in classifierHelper.js:
1. Avoid the reuse of same chunk numbers
2. Remove unused removeUrlFromDB function

MozReview-Commit-ID: XK1oHBa8gf

--HG--
extra : rebase_source : bf11c44ae98f34de43ac65ad4558ee53894e5568
2017-06-12 17:04:59 +08:00
DimiL f8c93f3b70 Bug 1366965 - Remove telemetry that compare SafeBrowsing V2 & V4. r=francois
MozReview-Commit-ID: 7vudFBK3rdp

--HG--
extra : rebase_source : ef027d6ec3d44b16dd4115f599e839aab1eadb88
2017-06-12 11:27:19 +08:00
Wes Kocher d4af1fa9e1 Merge m-c to inbound, a=merge
MozReview-Commit-ID: E2oiCGaL6uX
2017-06-08 18:42:21 -07:00
Kirk Steuber 0cd528ea92 Bug 1369160 - Add a Shavar list to be used to suppress the infobar, r=francois
The Flash infobar is showing up a bit too often. There are a few changes planned to address this. One of them is a list that will contain sites that should never display infobars. This patch allows the list to be downloaded from Shavar and updated via the URL classifier.

MozReview-Commit-ID: BgAaysyRzIE

--HG--
extra : rebase_source : a5f569a3bc60134938e9dc937cb5cfb84222a52b
extra : amend_source : 543e3c38b63d7b958c633c38e066ab9b47a76a01
2017-05-31 15:13:12 -07:00
Henry Chang 150a885dfa Bug 1362182 - Early return if mUpdateObserver has been nulled out by CancelUpdate(). r=francois
MozReview-Commit-ID: 2fQCtjMJkx

--HG--
extra : rebase_source : 33b16d2c1958d8a4dcd4cfa9eb3b602f2c84aa55
2017-06-06 17:51:51 +08:00
DimiL e4d42d14a2 Bug 1359299 - V4 caches in LookupCache need to be copied around in copy constructor. r=hchang
MozReview-Commit-ID: AjzUUmQKiPW

--HG--
extra : rebase_source : 1c30ee5aa3548dce9b861a70660b1e60410f3654
2017-06-06 14:16:57 +08:00
Thomas Nguyen fd95099ac3 Bug 1361699 - Add buffer when writing hashstore to file r=gcp,mcmanus
We write a lot of 4-bytes prefixes to file which call many system calls.
We should use a buffer and only write to file if the buffer is full or
finish writing. nsIBufferedOutputStream is a good candidate to do that

MozReview-Commit-ID: CzGOd7iXVTv

--HG--
extra : rebase_source : 25f1ce804b9a53e0a0a4023a1aa91f1a0ed98547
2017-05-19 13:17:07 +08:00
DimiL 8729c34142 Bug 1366996 - Fix uninitialized members in nsUrlClassifierInfo. r=francois
This was found by Coverity Scan (CID 1409773, 1409774).

MozReview-Commit-ID: LA7oPMobbie

--HG--
extra : rebase_source : 0ca4245e445f0b0da0073cee7b5ee95c621af75f
2017-05-31 08:52:34 +08:00
Andrew McCreight c11ddf3017 Bug 1368170 - Remove unused Function.prototype.inherits methods. r=francois
These methods do not appear to be used.

When JSM global sharing is enabled, these methods contaminate the
global Function.prototype, which breaks Marionette object
serialization.

MozReview-Commit-ID: CAfJ2FCkhlK

--HG--
extra : rebase_source : 38acb4616ee14283d0f67e1b2144972c7d139f84
2017-05-26 13:46:10 -07:00
Andrew McCreight 1471488de6 Bug 1367521 - Fix misspellings of "delegate". r=dholbert
MozReview-Commit-ID: KqOnp8rpCZD

--HG--
extra : rebase_source : 90bf8965737a1e808a5d2305ad395bdc99102cd1
2017-05-24 10:43:11 -07:00
Ryan VanderMeulen 35b3731614 Backed out changeset c0b940487708 (bug 1359299) for causing intermittent Windows safebrowsing crashes. 2017-05-24 09:11:04 -04:00
DimiL 81b83a1f76 Bug 1359299 - Copy fullhash cache when update. r=hchang
After adopting the new thread model for safebrowsing, we will create a new
lookup cache for update so we can still check lookup cache at the same time.

Prefix set, completions will be generated when we open the new lookup cache
but it won't include cache, so we will loss cache after that.

This patch will copy cache data from old lookup cache to new lookup
cache while update.

MozReview-Commit-ID: L0WpiHOGIGm

--HG--
extra : rebase_source : ebaf249535561b87a983a3f24dacb8fbab7c096e
2017-05-23 09:19:06 +08:00
Wes Kocher 2933592c4a Merge inbound to central, a=merge
MozReview-Commit-ID: 7NiWtCjPk84
2017-05-22 16:26:12 -07:00
Kershaw Chang f3cf6cd01e Bug 1312515 - Part 3: Test case. r=baku
This test aims to test the priority of the http channels created from XHR and Fetch inside a tracking script is lowest.

--HG--
extra : rebase_source : 556e503a69eda9bd1ec554f87e668bda66926ce1
2017-05-22 03:40:00 -04:00
DimiL c632a44157 Bug 1360480 - about:url-classifier: Cache information. r=francois
MozReview-Commit-ID: 4YXtb2KPgwL

--HG--
extra : rebase_source : ad9f897aa5772d6001a757e189730d427713f915
2017-05-17 10:32:33 +08:00
Francois Marier 3e30b74c36 Bug 1366394 - Bump the Safe Browsing update timeout to 15s. r=hchang
Based on the telemetry that landed as part of bug 1336904, Safe Browsing
updates are failing too often: https://mzl.la/2qGkOPS

This should enable browsers on slower networks to reach the update
servers while still putting a reasonable bound on how long the update
thread can be blocked.

MozReview-Commit-ID: 6puVtpMT87K

--HG--
extra : rebase_source : 4b68bb6778b45068bb8a2d0dbdfddfe24a6b022f
2017-05-19 14:25:11 -07:00
DimiL e5085bd203 Bug 1365877 - resetDatabase in SafeBrowsing test case should also reset cache. r=francois
resetDatabase() is used to clear out the Safe Browsing database and cache in tests.
Since bug 1333328 however we can no longer rely on updates clearing the cache.

There are two solutions to address this issue:
1. resetDatabase() calls another test-only function: reloadDatabase(). Since the cache
   is in memory, reloading the URL classifier will automatically clear the cache.
2. During an update, remove cache entries which are not in the database.

I prefer taking the first one because if we implement the second
approach, an update will take longer since we need to check if each prefix
in the cache can also be found in the database. I think this is not necessary
because prefixes not in the database will eventually be removed when they
are expired.

MozReview-Commit-ID: BjsDKDMr205

--HG--
extra : rebase_source : d4cf8d9876d1427a7917fc74ecb7bc1bf91bf371
2017-05-18 17:21:00 +08:00
Sebastian Hengst e07a98a1b3 Backed out changeset 44635c073692 (bug 1345058) on suspicion of causing intermittent xpcshell failures in toolkit/components/url-classifier/tests/unit/test_bug1274685_unowned_list.js on OS X. r=backout 2017-05-19 13:13:18 +02:00
Thomas Nguyen c8d511e264 Bug 1363879 - Sort gethash prefixes to hide noise entries r=francois
In V2 we shuffled the hash entries before sending the request to obscure the real
entry from noises. We should also hide the real entry in V4. Using sort() is
enough for both V2 and V4 because the array contains exactly 5 entries in almost
all cases.

MozReview-Commit-ID: 4uOXIF83KQL

--HG--
extra : rebase_source : 97c6439965e864863dc99f194356eb1efb0235df
2017-05-17 16:11:36 +08:00
Henry Chang a8cf105ce8 Bug 1345058 - Asynchronously decide if a flash document should be blocked. r=baku,bytesized
Technically speaking, we use the new async API 'nsIURIClassifier.asyncClassifyLocalWithTables'
to replace the old sync API. However, since we cannot guarantee the async call will be done when
we neet its result, we need a sync call as a fallback in this case. This is a sub-optimal
solution and we will be investigating if there's a better solution if the sync call
is used too frequently.

MozReview-Commit-ID: L1uQ2eaYr1e

--HG--
extra : rebase_source : 148e0e85796c932ea85d123092f479e1373ecec9
extra : intermediate-source : 53007a31b576fcd4f16ad6523cccd0a9b90c66f0
extra : source : 1175b9c64b31da2ca2ab88f78488aed6fdc405bc
2017-05-10 15:32:34 +08:00
Carsten "Tomcat" Book 24c443a440 merge mozilla-inbound to mozilla-central a=merge 2017-05-18 14:19:18 +02:00
Thomas Nguyen 5ea1675d95 Bug 1365466 - Remove enablePrivilege calls in SafeBrowsing test case. r=hchang
MozReview-Commit-ID: CedxaTfXFx0

--HG--
extra : rebase_source : 94cebcba757eab20b9300415151080e417fc7a1b
2017-05-16 19:20:00 -04:00
DimiL 7b98fa4c7e Bug 1364607 - Add a test for empty Safe Browsing updates. r=francois
This patch includes two test cases:
1. Apply an empty update through Classifier interface, which is the normal use case.
2. Apply an empty update through LookupCacheV4::ApplyUpdate, this ensure update algorithm is
   correct when applying an empty update. This scenario actually shouldn't happen in
   normal use case because it will be skipped by Classifier::CheckValidUpdate.

MozReview-Commit-ID: 9khsuVatX0u

--HG--
extra : rebase_source : 8db87dd2b8b4aec4546257e9f06dcc839b2ea181
2017-05-17 16:04:23 +08:00
Felipe Gomes e334e15634 Bug 1317856 - Ensure that flashblock tests are not affected by nosrc fallback rule. r=bytesized
With the activation of Ask-to-Activate mode by default, we'll also activate the fallback rule that favors fallback content when the object has not provided a src, so we need to prepare this test for that

MozReview-Commit-ID: JmmxJEiziHW

--HG--
rename : layout/generic/crashtests/simple_blank.swf => toolkit/components/url-classifier/tests/browser/simple_blank.swf
2017-05-16 22:56:23 -03:00
Chung-Sheng Fu 949647be91 Bug 1342900 - Remove usage of nsTArray<nsAutoPtr<>> in Classifier. r=dimi
MozReview-Commit-ID: 2SGPEuEg0lz

--HG--
extra : rebase_source : 88073453e592e78d969c00c67092ffefe4fb6581
2017-05-05 14:33:18 +08:00
Nathan Froyd c1d1748428 Bug 1359490 - add an event loop spinning abstraction function; r=gerald
This function is arguably nicer than calling NS_ProcessNextEvent
manually, is slightly more efficient, and will enable better auditing
for NS_ProcessNextEvent when we do Quantum DOM scheduling changes.
2017-05-15 09:34:19 -04:00
DimiL 0170f8b6dc Bug 1333328 - Remove mTableFreshness and gFreshnessGuarantee. r=francois
Functions and Preference related to mTableFreshness and gFreshnessGuarantee
could be removed since we will no longer require them.

MozReview-Commit-ID: IAa0UHLSQ56

--HG--
extra : rebase_source : daa959340c92cfcb751fe8d0548d30762db3783e
2017-05-04 11:13:21 +08:00
DimiL 5aef415cc6 Bug 1333328 - Refactor cache miss handling mechanism for V2. r=francois
In this patch, we will make Safebrowsing V2 caching use the same algorithm as V4.
So we remove "mMissCache" for negative caching and TableFresness check for
positive caching.

But Safebrowsing V2 doesn't contain negative/positive cache duration information in
gethash response. So we hard-code a fixed value, 15 minutes, as cache duration.
In this way, we can sync the mechanism we handle caching for V2 and V4.

An extra effort for V2 here is that we need to manually record prefixes misses
because we won't get any response for those prefixes(implemented in
nsUrlClassifierLookupCallback::CacheMisses).

--HG--
extra : rebase_source : 0fb7938464ad24a01a51493ecb1b5c0197c16123
2017-05-04 09:38:14 +08:00
Thomas Nguyen 3386ab601e Bug 1322523 - Add telemetry to capture the length of long Safe Browsing V4 prefixes r=francois
MozReview-Commit-ID: HhWhyJvyG85

--HG--
extra : rebase_source : e65917ae8e962107e2d707fc29164745d361a0aa
2017-05-14 14:09:10 +08:00
Florian Quèze 97f401c644 Bug 1362882 - script-generated patch to switch from Promise.defer() to new Promise() where it's straightforward, rs=Mossop. 2017-05-12 14:55:27 +02:00
Florian Quèze 5e3539e504 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Henry Chang 2cf3eadc99 Bug 1363266 - Post an event to main thread to set |done| to true. r=froydnj
This is in preparation for being able to be replaced with SpinEventLoopUntil(),
which is going to be shipped in bug 1359490.

MozReview-Commit-ID: AChVqh4kfVb

--HG--
extra : rebase_source : 03f8d36c29d74fed34ebed6ae3cb31ca829c3e41
2017-05-09 11:42:52 +08:00
Francois Marier 6d8aa577bc Bug 1362501 - Use LINUX_PLATFORM for Safe Browsing on non-Windows and non-OSX platforms. r=gcp
MozReview-Commit-ID: 58059M8IhL

--HG--
extra : rebase_source : 605969481758e175c078dbd48083467649bdf1a2
2017-05-05 11:38:38 -07:00
dimi 09aa558f00 Bug 1362112 - Add missing string in aboutUrlClassifier.properties. r=francois
MozReview-Commit-ID: HXptt8ElxSX

--HG--
extra : rebase_source : 7e114b77be4de632273da79080d8e658ea60d7b4
2017-05-05 12:42:31 +08:00
Thomas Nguyen 52ed9fd77e Bug 1351472 - Skip AddNoise if the table is unknown or disallowed to getHash r=francois
MozReview-Commit-ID: GMWs2UpiyiP

--HG--
extra : rebase_source : 9b24bf9fa6ad5aa12077f6e4ffa2ac65b0862b40
2017-04-28 15:26:54 +08:00
Jeff Walden 49e19243fd Give a local anonymous struct a name, in order to work around a toolchain compiler deficiency of the browser rooting-hazard-analysis setup. No bug, r=sfink over IRC 2017-05-01 19:40:16 -07:00
Thomas Nguyen 701f2e65fa Bug 1336904 - Add timeouts for Safe Browsing updates r=francois
These timeouts will ensure that we don't block the Safe Browsing update thread
for too long when we encounter slow or bad network conditions.

MozReview-Commit-ID: AJfR193cTf8

--HG--
extra : rebase_source : 5ae14f204ed88691fac4e9ba8c8202b8aa79b657
2017-04-24 17:51:06 +08:00
DimiL b5d0ae1f48 Bug 1358324 - The URLCLASSIFIER_MATCH_THREAT_TYPE_RESULT probe doesn't seem to be working correctly. r=francois
mResults is lookupResultArray which is created when we find matched prefix in the database.
mCacheResults stores response of gethash request.

We record threat type match telemetry only when completion is found in both V2 and V4,
that is we got one confirmed result for V2 and one for V4. And then we could record threat
types by iterating through mCacheResultsArray.

But if one of lookupResult is from cache, for example, completion is found in 'goog-malware-proto',
then we won't trigger a gethash request for it because it is in the cache.
In this scenario, mCacheResults will not have results from V4 so when we try to record
threat types we won't find V4 ones.

In this patch we only record telemetry when gethash is sent for both V2 and V4. This may limit
the usefulness of that probe a little bit, but we shouldn't make the code less efficient just
to be able to measure telemetry better.

MozReview-Commit-ID: Ib8SGUaxb4c

--HG--
extra : rebase_source : 03265ddd5253d3ae9ae4a7a20bca6ca19d2e7595
2017-04-21 15:09:44 +08:00
Thomas Nguyen a081a75c9b Bug 1336915 - Disable updates and fullhash requests when the Google API key is missing r=francois
We only register google table if we have a valid google api keys

MozReview-Commit-ID: CJmJErxSOqa

--HG--
extra : rebase_source : e7cb2965ea5206afd47bc37d712677f939c3c26e
2017-04-25 15:20:44 +08:00
Michael Layzell 8b7ba021a4 Bug 1339537 - Part 6: Pass std::function values tree by const reference instead of by value, r=ehsan
MozReview-Commit-ID: PVAqU2DPs2
2017-04-27 12:44:57 -04:00
Thomas Nguyen ae9e3b7638 Bug 1353853 - Cache preferences when doing channel classify r=francois
We will cache all preferences which will be read during classifing channel
- Store them into static variables nsUrlClassifierDBService
- Use a singleton class to manage/update preferrences in nsChannelClassifier

MozReview-Commit-ID: GvyBI3rVpYh

--HG--
extra : rebase_source : 0cec0724bd47f55c7b1666e700d172698a708efb
2017-04-18 17:00:27 +08:00
Dimi Lee 647b77b7fc Bug 1348253 - about:url-classifier: Providers information and update button. r=francois
The about:url-classifier supports following functions:
1. Provider section
  - Show update status for each provider, update status include
    last update time, next update time and last update status
  - Update button to manually trigger an update for the provider.

2. Debug section
  - Set MOZ_LOG Modules
  - Set MOZ_LOG_FILE

MozReview-Commit-ID: AHiveKEHSNC

--HG--
extra : rebase_source : b56e918de7f4eb30ad8eebc6d24ffaf2e76f4f4e
2017-04-19 00:33:08 +08:00
DimiL c18e9c758a Bug 1357207 - Caching duration recorded to telemetry should be milli-second . r=francois
In Bug 1311935, We change positive/negative cache duration from milli-second to second.
But the value doesn't covert back to milli-second when store to telemetry(telemetry use
milli-second).

MozReview-Commit-ID: KR6xn9pwhUd

--HG--
extra : rebase_source : 378149dc29d61cbca31b8aa913df946ceff556f3
2017-04-18 12:01:09 +08:00
DimiL 8eed56ee65 Bug 1296406 - Fix ReloadDatabase API fail in safebrowsing testcase. r=francois
Recent change of safebrowsing thread model may cause nsUrlClassifierDBService::ReloadDatabase
API fail if there is an ongoing update at the same.

Fix this issue by adding retry in testcase.

MozReview-Commit-ID: CZGMpQvuzum

--HG--
extra : rebase_source : c59937f3e11bafcb2ad501872ffa29bafe84dad8
2017-04-17 09:13:41 +08:00
Kirk Steuber b7efd17a07 Bug 1356156 - Increase test timeout for Flash block tests r=francois
The Flash block tests sometimes timeout in debug runs. So far it has always happened the same way. All assertions in the test run (and pass), but the test times out during cleanup. Bumping up the timeout for these tests should fix this problem.

MozReview-Commit-ID: F04nSzSyLtr

--HG--
extra : rebase_source : 181546e1fe4b56686a06cb71e059a4b07f6fb957
2017-04-14 09:38:39 -07:00
Florian Queze 4c6a68d1c9 Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
Florian Queze ea6ac7cbf2 Bug 1356569 - Remove some more newURI null trailing parameters, r=jaws. 2017-04-14 21:51:40 +02:00
Florian Queze f935ddc4b3 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 37f2343b9a Bug 1356569 - Remove appendElement's last parameter when it is false, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
dimi 0cdd204e0e Bug 1356067 - Fix memory leak in nsUrlClassifierLookupCallback::CompletionV4. r=francois
MozReview-Commit-ID: 67ANYHWIRX0

--HG--
extra : rebase_source : ea79c75e4dcb56fa05277b13ca5a46c7cec0650d
2017-04-13 15:39:30 +08:00
Henry Chang 1188da748e Bug 1338638 - Fix race condition for DBService APIs to avoid long delayed initial download. r=francois
When starting up, SafeBrowsing.jsm will try to use DBService to add testing entries. Meanwhile,
listmanager will request StreamUpdater to download lists with a random initial delay.

The requests that listmanager issue to StreamUpdater will be queued up
if DBserve is busy and will be retried when StreamUpdater is notified that
the previous update is complete. However, in some edge cases,
the queued requests may not be processed until the next update request from listmanager.
For example, SafeBrowsing.jsm calls DBService.beginUpdate at t0 and the update is
complete at t1. If listmanager sends all requests via StreamUpdate between t0 and t1,
they will all be queued up and no further request can trigger the queued ones.

So in this patch I add a timer to re-trigger FetchNextRequest() in case StreamUpdater is not
notified the previous update is complete.

MozReview-Commit-ID: 3hHsS5N7WRI

--HG--
extra : rebase_source : 1c1ac7212626f1bf83b355dd27b1ddeae6df2e03
2017-04-11 17:13:01 +08:00
Henry Chang a1d114de50 Bug 1354968 - Avoid concurrent access of mTableRefreshness. r=francois
mTableRefreshness, a non-thread-safe object, might be accessed on worker thread
and update thread cocurrently. To solve this issue, on update thread we only
insert data to mNewTableRefreshness and merge to mTableRefreshness on
the worker thread later.

MozReview-Commit-ID: 9WgoeYfWVfK

--HG--
extra : rebase_source : b7a8b4cd9d0fb1471cb81ee239f8343ff9a7b38a
2017-04-11 01:02:42 +08:00
dimi 619704ce7d Bug 1311933 - P2. Add telemetry to measure if completion match type is the same for v2 and v4. r=francois
When full match is found in both v2 and v4, the threat types returned should also be the same.
If threat types are different, the telemetry record this by setting a bit flags which indicates
what threat types are being returned.

If threat types are the same, this telemetry will record 0.

MozReview-Commit-ID: Laz77yoCg00

--HG--
extra : rebase_source : 1bcace8464c9d6472a745f66fd547b186e5b3297
2017-04-12 09:11:18 +08:00
dimi ec8a9a8f96 Bug 1311933 - P1. Use integer as the key of safebrowsing cache. r=francois
In Bug 1323953, we always send 4-bytes prefix for completion and the prefix is also
used as the key to store cache result from gethash request.
Since it is always 4-bytes, we could convert it to integer for simplicity.

MozReview-Commit-ID: Lkvrg0wvX5Z

--HG--
extra : rebase_source : 7002b1f55bc0f88ed90340082574cc931f8db87a
2017-04-11 16:07:26 +08:00
DimiL 83e6d8500c Bug 1311935 - P4. GTest for safebrowsing v4 caching. r=francois
MozReview-Commit-ID: ExR5NJUvzNg

--HG--
extra : rebase_source : 868f508256c06724e24f8a7c91171aaae72200d2
2017-04-07 14:31:04 +08:00
dimi 7842472dad Bug 1311935 - P3. Implement safebrowsing v4 caching logic. r=francois
LookupCacheV4::Has implements safebrowsing v4 caching logic.
1. Check if fullhash match any prefix in local database:
  - If not, the URL is safe.
2. Check if prefix is in the cache(prefix is always the first 4-byte of
   the fullhash, Bug 1323953):
  - If not, send fullhash request
3. Check if fullhash is in the positive cache:
  - If fullhash is found and it is not expired, the URL is not safe.
  - If fullhash is found and it is expired, send fullhash request.
4. If fullhash is not found, check negative cache expired time:
  - If negative cache time is not expired, the URL is safe.
  - If negative cache time is expired, send fullhash request.

MozReview-Commit-ID: GRX7CP8ig49

--HG--
extra : rebase_source : 6d3ae8929b11731584810c44d46a1526f7d83e12
2017-04-10 14:21:08 +08:00
dimi 127351f6ef Bug 1311935 - P2. Process fullHashes.find response. r=francois
This patch includes following changes:

1. nsUrlClassifierHashCompleter.js
   nsUrlClassifierHashCompleter.idl
   - Add completionV4 interface for hashCompleter to pass response data to
     DB service.
   - Process response data includes negative cache duration, matched full
     hashes and cache duration for each match. Full matches are passed through
     nsIFullHashMatch interface.
   - Change _requests.responses from array contains matched fullhashes to
     dictionary so that it can store additional information likes negative cache
     duration.
2. nsUrlClassifierDBService.cpp
   - Implement CompletionV4 interface, store response data to CacheResultV4
     object. Expired duration to expired time is handled here.
   - Add CacheResultToTableUpdate function to convert V2 & V4 cache result
     to TableUpdate object.
3. LookupCache.h
   - Extend CacheResult to CacheResultV2 and CacheResultV4 so we can store
     response data in CompletionV2 and CompletionV4.
4. HashStore.h
   - Add API and member variable in TableUpdateV4 to store response data.
     TableUpdate object is used by DB service to pass update data or gethash
     response to Classifier, so we need to extend TableUpdateV4 to be able
     to store fullHashes.find response.
6. Entry.h
   - Define the structure about how we cache fullHashes.find response.

MozReview-Commit-ID: FV4yAl2SAc6

--HG--
extra : rebase_source : 02676ded9bc0580c24b4c906199a4abaf004e296
2017-04-11 11:50:48 +08:00
DimiL b4f6db923f Bug 1311935 - P1. Make ActiveTables() work for safebrowsing v4. r=francois
This patch fixes that Classifier::ActiveTables doesn't return v4 tables.

Classifier::mActiveTablesCache is generated by scanning safebrowsing directory.
We use Classifier::ScanStoreDir to do the work, but it will ignore subdirectory.
Since v4 tables are stored in subdirectory 'google4', mActiveTablesCache doesn't
include v4 tables.

Fix this issue by checking subdirectory recursively in ScanStoreDir.

MozReview-Commit-ID: I6pa6e4bFND

--HG--
extra : rebase_source : 49d19101bec780e21db668b2daff3c46bbdb3fd2
2017-04-07 14:30:11 +08:00
Iris Hsiao 3d85c0330d Backed out 4 changesets (bug 1311935) for causing assertion crash by developer's request
Backed out changeset 27e624cd9479 (bug 1311935)
Backed out changeset 4c0381ab0990 (bug 1311935)
Backed out changeset 73587838ef16 (bug 1311935)
Backed out changeset a5a6c0f79733 (bug 1311935)
2017-04-11 11:04:54 +08:00
DimiL 1acdaf206b Bug 1311935 - P4. GTest for safebrowsing v4 caching. r=francois
MozReview-Commit-ID: ExR5NJUvzNg

--HG--
extra : rebase_source : ec16b8b1e976753a013d27c197ac54c98b1d5501
2017-04-07 14:31:04 +08:00
dimi a58847dca1 Bug 1311935 - P3. Implement safebrowsing v4 caching logic. r=francois
LookupCacheV4::Has implements safebrowsing v4 caching logic.
1. Check if fullhash match any prefix in local database:
  - If not, the URL is safe.
2. Check if prefix is in the cache(prefix is always the first 4-byte of
   the fullhash, Bug 1323953):
  - If not, send fullhash request
3. Check if fullhash is in the positive cache:
  - If fullhash is found and it is not expired, the URL is not safe.
  - If fullhash is found and it is expired, send fullhash request.
4. If fullhash is not found, check negative cache expired time:
  - If negative cache time is not expired, the URL is safe.
  - If negative cache time is expired, send fullhash request.

MozReview-Commit-ID: GRX7CP8ig49

--HG--
extra : rebase_source : bcb5fa7aa2b7b116d862e3382447611424603c2d
2017-04-10 14:21:08 +08:00
dimi 5112db082c Bug 1311935 - P2. Process fullHashes.find response. r=francois
This patch includes following changes:

1. nsUrlClassifierHashCompleter.js
   nsUrlClassifierHashCompleter.idl
   - Add completionV4 interface for hashCompleter to pass response data to
     DB service.
   - Process response data includes negative cache duration, matched full
     hashes and cache duration for each match. Full matches are passed through
     nsIFullHashMatch interface.
   - Change _requests.responses from array contains matched fullhashes to
     dictionary so that it can store additional information likes negative cache
     duration.
2. nsUrlClassifierDBService.cpp
   - Implement CompletionV4 interface, store response data to CacheResultV4
     object. Expired duration to expired time is handled here.
   - Add CacheResultToTableUpdate function to convert V2 & V4 cache result
     to TableUpdate object.
3. LookupCache.h
   - Extend CacheResult to CacheResultV2 and CacheResultV4 so we can store
     response data in CompletionV2 and CompletionV4.
4. HashStore.h
   - Add API and member variable in TableUpdateV4 to store response data.
     TableUpdate object is used by DB service to pass update data or gethash
     response to Classifier, so we need to extend TableUpdateV4 to be able
     to store fullHashes.find response.
6. Entry.h
   - Define the structure about how we cache fullHashes.find response.

MozReview-Commit-ID: KgR1NASl7GC

--HG--
extra : rebase_source : 424db14e4af2ffd691c384414d50f64083d5d20b
2017-04-10 16:20:09 +08:00
DimiL 516a287f2b Bug 1311935 - P1. Make ActiveTables() work for safebrowsing v4. r=francois
This patch fixes that Classifier::ActiveTables doesn't return v4 tables.

Classifier::mActiveTablesCache is generated by scanning safebrowsing directory.
We use Classifier::ScanStoreDir to do the work, but it will ignore subdirectory.
Since v4 tables are stored in subdirectory 'google4', mActiveTablesCache doesn't
include v4 tables.

Fix this issue by checking subdirectory recursively in ScanStoreDir.

MozReview-Commit-ID: I6pa6e4bFND

--HG--
extra : rebase_source : 49d19101bec780e21db668b2daff3c46bbdb3fd2
2017-04-07 14:30:11 +08:00
Joel Maher bc070be3c8 Bug 1351067 - add BUG_COMPONENT to toolkit/* files. r=myk,enndeakin,mossop
MozReview-Commit-ID: 8mv5Oed68JL
2017-04-09 05:43:43 -04:00
Sebastian Hengst da33db7ea3 Backed out changeset 2f185f0d9e26 (bug 1311935) for failing browser_trackingUI_6.js. r=backout 2017-04-07 19:06:18 +02:00
Sebastian Hengst 49d5b0cb36 Backed out changeset fc8099c8f98a (bug 1311935) 2017-04-07 19:05:42 +02:00
Sebastian Hengst 81e1f786ea Backed out changeset a4e571cb610a (bug 1311935) 2017-04-07 19:05:38 +02:00
Sebastian Hengst 8a85b26e44 Backed out changeset 18a286ccf1be (bug 1311935) 2017-04-07 19:05:33 +02:00
DimiL 755568bb81 Bug 1311935 - P4. GTest for safebrowsing v4 caching. r=francois
MozReview-Commit-ID: ExR5NJUvzNg

--HG--
extra : rebase_source : 5cbb47c9d5517617aa31bb0c3e1cbfce3f75e3fd
2017-04-07 14:31:04 +08:00
"unknown@unknown.com" 17b3832fc2 Bug 1311935 - P3. Implement safebrowsing v4 caching logic. r=francois
LookupCacheV4::Has implements safebrowsing v4 caching logic.
1. Check if fullhash match any prefix in local database:
  - If not, the URL is safe.
2. Check if prefix is in the cache(prefix is always the first 4-byte of
   the fullhash, Bug 1323953):
  - If not, send fullhash request
3. Check if fullhash is in the positive cache:
  - If fullhash is found and it is not expired, the URL is not safe.
  - If fullhash is found and it is expired, send fullhash request.
4. If fullhash is not found, check negative cache expired time:
  - If negative cache time is not expired, the URL is safe.
  - If negative cache time is expired, send fullhash request.

MozReview-Commit-ID: HFpqaOGOtUa

--HG--
extra : rebase_source : 726acb50489c4fa20c99fc8c4d96a3c8351655f5
2017-04-07 14:30:28 +08:00
dimi 9ef006afe3 Bug 1311935 - P2. Process fullHashes.find response. r=francois
This patch includes following changes:

1. nsUrlClassifierHashCompleter.js
   nsUrlClassifierHashCompleter.idl
   - Add completionV4 interface for hashCompleter to pass response data to
     DB service.
   - Process response data includes negative cache duration, matched full
     hashes and cache duration for each match. Full matches are passed through
     nsIFullHashMatch interface.
   - Change _requests.responses from array contains matched fullhashes to
     dictionary so that it can store additional information likes negative cache
     duration.
2. nsUrlClassifierDBService.cpp
   - Implement CompletionV4 interface, store response data to CacheResultV4
     object. Expired duration to expired time is handled here.
   - Add CacheResultToTableUpdate function to convert V2 & V4 cache result
     to TableUpdate object.
3. LookupCache.h
   - Extend CacheResult to CacheResultV2 and CacheResultV4 so we can store
     response data in CompletionV2 and CompletionV4.
4. HashStore.h
   - Add API and member variable in TableUpdateV4 to store response data.
     TableUpdate object is used by DB service to pass update data or gethash
     response to Classifier, so we need to extend TableUpdateV4 to be able
     to store fullHashes.find response.
6. Entry.h
   - Define the structure about how we cache fullHashes.find response.

MozReview-Commit-ID: 8pUJITn8c1n

--HG--
extra : rebase_source : efc1ef8e47cd5d0774a931f235e7e0bbdc56fedf
2017-04-07 16:56:08 +08:00
DimiL b322ff44c1 Bug 1311935 - P1. Make ActiveTables() work for safebrowsing v4. r=francois
This patch fixes that Classifier::ActiveTables doesn't return v4 tables.

Classifier::mActiveTablesCache is generated by scanning safebrowsing directory.
We use Classifier::ScanStoreDir to do the work, but it will ignore subdirectory.
Since v4 tables are stored in subdirectory 'google4', mActiveTablesCache doesn't
include v4 tables.

Fix this issue by checking subdirectory recursively in ScanStoreDir.

MozReview-Commit-ID: I6pa6e4bFND

--HG--
extra : rebase_source : 6844e03f1e3c28ebb25ac3885c35a80c42a857d9
2017-04-07 14:30:11 +08:00
Henry Chang eec96acbf0 Bug 1343425 - Supports nsIURIClassifier.asyncClassifyLocalWithTables. r=baku
We add a new "on-off" protocol PURLClassifierLocal which calls
nsIURIClassifier.asyncClassifyLocalWithTables on construction and
calls back on destruction. Pretty much the same design as PURLClassifier.

In order to avoid code duplication, the actor implementation is templatized
and |MaybeInfo| in PURLClassifier.ipdl is moved around.

Test case is included and the custom event target is not in place for labelling.
The custom event target will be done in Bug 1353701.

MozReview-Commit-ID: IdHYgdnBV7S

--HG--
extra : rebase_source : ab1c896305b9f76cab13a92c9bd88c2d356aacb7
2017-04-07 14:15:16 +08:00
Henry Chang f3be63826d Bug 1339050 - Asynchronously apply safebrowsing DB update. r=francois,gcp
A new function Classifier::AsyncApplyUpdates() is implemented for async update.
Besides, all public Classifier interfaces become "worker thread only" and
we remove DBServiceWorker::ApplyUpdatesBackground/Foreground.

In DBServiceWorker::FinishUpdate, instead of calling Classifier::ApplyUpdates,
we call Classifier::AsyncApplyUpdates and install a callback for notifying
the update observer when update is finished. The callback will occur on the
caller thread (i.e. worker thread.)

As for the shutdown issue, when the main thread is notified to shut down,
we at first *synchronously* dispatch an event to the worker thread to
shut down the update thread. After getting synchronized with all other
threads, we send last two events "CancelUpdate" and "CloseDb" to notify
dangling update (i.e. BeginUpdate is called but FinishUpdate isn't)
and do cleanup work.

MozReview-Commit-ID: DXZvA2eFKlc

--HG--
extra : rebase_source : cd2e27a6b679d2c96e769854d1582ed2dcda12bb
2017-04-06 07:07:56 +08:00
Thomas Nguyen f0a98a30fa Bug 1336903 - Add telemetry probes to track Safe Browsing server response time r=francois
The probes keep track of V2 and V4 server response to update and getHash
request. The probes are keyed by provider

MozReview-Commit-ID: 3Uxjm6H77lE

--HG--
extra : rebase_source : 647523a24bad8334dbb34758954a5f5db0e9b96c
2017-03-24 15:41:23 +08:00
Kirk Steuber 68f7cb1b36 Bug 1350381 - Change Flash blocking to allow the setting "Ask to Activate" to control CTA of unknown documents. r=qdot
Previously, we operated under the understanding that with Flash blocking activated, non-whitelisted documents would be set to CTA. We are changing that such that now, documents will only be CTA'ed if Flash is set to "Ask to Activate".

Flash blocking will now behave according to the following chart:

User Setting   Flash block   Whitelisted sites   Blacklisted sites    Unlisted sites
"Never ..."    Off           Deny                Deny                 Deny
"Ask ..."      Off           Ask                 Ask                  Ask
"Always ..."   Off           Allow               Allow                Allow
"Never ..."    On            Deny                Deny                 Deny
"Ask ..."      On            Allow               Deny                 Ask
"Always ..."   On            Allow               Deny                 Allow

This patch also completely reworks the flash blocking testing. Test data and most code remains consolidated, but will be run in multiple different tests. This avoids having to extend the timeout for Flash block testing to an extremely long length. The new Flash block testing additionally tests each of the six cases (rows) in the table above.

MozReview-Commit-ID: 5aPGUEiUiCv

--HG--
extra : rebase_source : d5f5711855d108a9a33b9d28aae6e312cc9cb432
2017-03-24 14:15:02 -07:00
dimi 229fe1f890 Bug 1350798 - Ignore v4 completion too early will cause telemetry::URLCLASSIFIER_MATCH_RESULT gets wrong results. r=francois
Enable safebrowsing v4 completion but ignore the result by checking preference in
nsUrlClassifierLookupCallback::Completion may cause telemetry measure incorrect match
result since v4 completions will always be ignored.

So in this patch we move the preference check after telemetry is measured and then we
ignore the result.

MozReview-Commit-ID: J29JitvW3Lc

--HG--
extra : rebase_source : 0cf8797de476980ce25d83099e6526321308327c
2017-03-28 09:09:57 +08:00
Carsten "Tomcat" Book 187105652e Merge mozilla-central to autoland 2017-03-23 13:59:20 +01:00
dimi b512891a41 Bug 1338033 - Remove URLCLASSIFIER_PREFIX_MATCH. r=francois
URLCLASSIFIER_PREFIX_MATCH is replaced by URLCLASSIFIER_FULL_MATCH(Bug 1311931)
so it should be removed.

MozReview-Commit-ID: 4F1B07bGwRP

--HG--
extra : rebase_source : 2d3e5cda14df4e874bf31145ccb5330acec369f7
2017-03-22 17:27:11 +08:00
Sébastien Blin ccc234ac92 Bug 1298321 - Refactor tests related to getHash. r=francois 2017-01-17 07:03:00 -05:00
Mark Banner bd625e4e9f Bug 1347712 - Change the testing configurations into ESLint configurations within eslint-plugin-mozilla - automatically update .eslintrc.js test config files for new config locations. r=jaws
MozReview-Commit-ID: LH0CQOPfoe6

--HG--
extra : rebase_source : 83eaf40c5cbb5e25cfb3f3b5afadf4fbf0422c92
2017-03-20 12:36:37 +01:00
Thomas Nguyen 405f2f52de Bug 1345569 - Get blocked info from content when clicking report false deceiptive site from xul browser. r=francois
MozReview-Commit-ID: GXkbjfOrnHX

--HG--
extra : rebase_source : 7130d656b0dfd2f0cbc64227657347efdce54036
2017-03-20 14:43:08 +08:00
Henry Chang c6fa23934d Bug 1348626 - Retry when isPinged() failed to avoid false alarm. r=francois
MozReview-Commit-ID: BOdJZReICxZ

--HG--
extra : rebase_source : 16e0b0b1a65d0bc1249ff0583947acd39defb5d9
2017-03-19 15:52:25 +08:00
dimi b98b77568d Bug 1346196 - URLCLASSIFIER_UPDATE_REMOTE_STATUS2 records values using empty keys. r=francois
mTelemetryProvider might be empty if |CancelUpdate| is called during update.
In that scenario, the call flow will look like:
CancelUpdate -> UpdateError -> DownloadDone -> set mTelemetryProvider to empty ->
OnStartRequest -> record telemetry with empty key.

So in this patch, move mTelemetryProvider.Truncate() to OnStopRequest.

MozReview-Commit-ID: JDgNUqR4SKa

--HG--
extra : rebase_source : 42aa4c898f403a1189e67e355246ebed5aa4af44
2017-03-16 14:42:46 +08:00
Henry Chang b769db9a5e Bug 1347657 - Use array entry as value instead of reference to avoid being invalidated by realloc. r=francois
nsTArray::AppendElement may cause memory reallocation if out of capacity.
In nsUrlClassifierStreamUpdater::FetchNextRequest(), we take the reference of
the first element of mPendingRequests and pass its member as reference to
DownloadUpdate(), where mPendingRequests.AppendElement will be called.
If the AppendElement in DownloadUpdate() causes realloc, the reference
becomes dangling.

The most efficient fix is to "move" the reference's (i.e. request)
member variables to DownloadUpdate() but I think in this case we can just
take the value from the array and pass it around with no given that the
array element contains simply a couple of strings and pointers.

MozReview-Commit-ID: KEZ5d3l3HoI

--HG--
extra : rebase_source : 4bf61a8a6f6bc57523dfbb7e5b0b40b7ce77a57a
2017-03-16 15:19:45 +08:00
Henry Chang 3dc1381af2 Bug 1345922 - Avoid concurrent update and take the failed beginUpdate into account. r=francois
MozReview-Commit-ID: IfRIazBvAyl

--HG--
extra : rebase_source : 1dbd31d24e087c6f6ee6d45302facf744862c892
2017-03-10 00:47:26 +08:00
Kirk Steuber bae89898aa Bug 1345611 - Change behavior of subdocument Flash blocking to be Third-Party Flash blocking r=bsmedberg,qdot
The previous implementation regarding to the Flash Blocking Subdocument list blocked all subdocuments that matched the list. This patch changes that so that subdocuments are only blocked if they are on the Subdocument Block List and also are loaded in a Third-Party context.

The changes to cert8.db and key3.db add the https certificate for subdocument.example.com so that testing can verify that a scheme mismatch between the document and its parent results in a third-party classification.

MozReview-Commit-ID: IXnA4iPzB4y

--HG--
extra : rebase_source : 103c1e184d4219e6db9d00da1ea54674a0e216dd
2017-03-10 10:50:21 -08:00
Henry Chang c5e545347a Bug 1346757 - Change the downloadError callback timing. r=francois
MozReview-Commit-ID: JleLPltEBOw

--HG--
extra : rebase_source : 842aad60fb5b1f9345ceae4bac68825a6c2c718f
2017-03-13 21:16:07 +08:00
Thomas Nguyen e98654c1e4 Bug 1343416 - Use LCG when generating noise entries for Safe Browsing completions r=gcp
MozReview-Commit-ID: FxQH2haAcrf

--HG--
extra : rebase_source : 4fbd5bd18c4278682a52783b41bf0cc09aa91a2f
2017-03-09 10:59:52 +08:00
Carsten "Tomcat" Book 96fe421b34 Merge mozilla-central to autoland 2017-03-08 17:04:17 +01:00
Benjamin Smedberg 5a67592fe7 Bug 1344908 - Build flash-block-lists.rst into the generated documentation, r=bytesized
MozReview-Commit-ID: AdHUGjNXQjL

--HG--
rename : toolkit/components/url-classifier/flash-block-lists.rst => toolkit/components/url-classifier/docs/flash-block-lists.rst
extra : rebase_source : c6772fca9107f77a78588746b5a4bc27c64035c7
2017-03-06 17:11:44 -05:00
Thomas Nguyen 2b86f73c62 Bug 1339006 - Specify event target if we run nsIURIClassifier.clasify() from content process.r=ehsan, r=gcp
MozReview-Commit-ID: BztjVMlQngi
2017-03-08 11:06:36 +08:00
Wes Kocher dac8dc0c7b Merge inbound to central, a=merge
MozReview-Commit-ID: 96co4Bbby7W
2017-03-07 16:40:44 -08:00
Florian Quèze 7f1b926f29 Bug 1344711 - hand cleanup of cases that were ignored by the script to remove try blocks around get*Pref calls, r=jaws.
--HG--
extra : rebase_source : 4da1e10b87ac37de19e0ca6f79996e8a12492db9
2017-03-07 15:29:48 +01:00
Henry Chang 0b68cc7689 Bug 1339760 - Split update process to background/foreground and run background on update thread **synchronously**. r=francois,gcp
MozReview-Commit-ID: J0phPC1nWsf

--HG--
extra : rebase_source : c212bd9fba1ef5951d238967a9b32e4fde0d718b
extra : source : 3daedf653e989c2d91deea785ed9598f2254e609
2017-02-22 17:25:26 +08:00
David Major ed0b8f8653 Bug 1344615: Remove nsXPCOMStrings.{h,cpp} r=bsmedberg
These are now dead code.

MozReview-Commit-ID: AClU0Qx3kmN

--HG--
extra : rebase_source : df83cf89292da1519bb26027c11e14923d5c54a0
2017-03-06 17:52:54 +13:00
Carsten "Tomcat" Book 4a4777d1aa merge mozilla-inbound to mozilla-central a=merge 2017-03-02 14:02:48 +01:00
Thomas Nguyen c9e5c3a9e6 Bug 1341514 - Using the valid update url provider in test. r=gcp
MozReview-Commit-ID: 50NcRd2e9hB

--HG--
extra : rebase_source : 9ae7f98578837aa42b20bfd802d71934c9f3bd28
2017-03-02 00:07:53 +08:00
Wes Kocher 77f821f58a Merge m-c to autoland, a=merge
MozReview-Commit-ID: 8dvpEkAL5Vh
2017-02-27 13:39:07 -08:00
Wes Kocher 1e95bd721f Merge inbound to central, a=merge
MozReview-Commit-ID: F0XvCKnh8H7
2017-02-27 13:34:55 -08:00
Thomas Nguyen c288aaed0e Bug 1331139 - Sync safebrowsing.proto from Chromium. r=francois
MozReview-Commit-ID: KWi8wWhqCcr

--HG--
extra : rebase_source : 3b72333857874b3b6d03d261d4d6248ece209383
2017-02-27 12:18:50 +08:00
Thomas Nguyen 41511788f2 Bug 1331139 - Enable download protection for V4 lists. r=francois
MozReview-Commit-ID: 8IHKGvXQjPt

--HG--
extra : rebase_source : da86fa38df68be976f482e2a4033b2e668e97850
2017-02-27 12:18:33 +08:00
Henry Chang 6b96dcfdab Bug 1342397 - Properly reset stuff when failing to create LookupCache for update. r=gcp
MozReview-Commit-ID: 1ecI2lFIj2U

--HG--
extra : rebase_source : 49c5e460a1178253ce2afc1cdfd71dd66e370284
2017-02-25 00:22:39 +08:00
Thomas Nguyen 3bf1789995 Bug 1341514 - Disable test_reporturl.html due to intermittent failure. a=testonly
MozReview-Commit-ID: Ff7koH8xIwJ
* * *
[mq]: TEST-INFO

MozReview-Commit-ID: 9TUQqlj7h3M
2017-02-27 16:57:05 +08:00
Dimi Lee 244358a9ac Bug 1335974 - Add more error codes to URLCLASSIFIER_UPDATE_ERROR. r=francois
MozReview-Commit-ID: AAd6Yu0AuUO

--HG--
extra : rebase_source : 63fdc2309348355d74b9bb738d75953d0b435b0f
2017-02-22 16:25:04 +08:00
Dimi Lee 18092dba59 Bug 1332780 - Add telemetry to record network error while SafeBrowsing update. r=francois
MozReview-Commit-ID: 7Yqxs0XHmNP

--HG--
extra : rebase_source : 638d30a5c2f47c6075194f2459128bc980fbaff9
2017-02-24 09:54:49 +08:00
Thomas Nguyen 3f7a3e400f Bug 1297962 - Add noise data when sending v4 gethash request r=francois
MozReview-Commit-ID: GbyvX7wcg8c
* * *
[mq]: 1297962_review

MozReview-Commit-ID: 1U2T0wq778R

--HG--
extra : rebase_source : 55f852204aa29b135360e461b8c152e45fecc7b6
2017-02-24 10:22:12 +08:00
Dimi Lee b740658c54 Bug 1311931 - Add telemetry to measure full match rate for v2 and v4. r=francois
MozReview-Commit-ID: H9jAR82rgDh

--HG--
extra : rebase_source : 45b40d6d097882134eff38fe9a434e78cd4a56b1
2017-02-23 23:07:13 +08:00
Henry Chang 44b63dd967 Bug 1341506 - Part 2: Add telemetry for AsyncClassifyLocalWithTables. r=francois
MozReview-Commit-ID: 14QG0AdxbE5

--HG--
extra : rebase_source : 03711983d054bd32fcbb2c7e92f9dcf3f6a2f962
extra : source : 1c83c11ea0da03da16fd65d25258018d36072874
2017-02-24 00:14:11 +08:00
Henry Chang 9595454ca7 Bug 1341506 - Part 1: Implement and use nsIURIClassifier.asyncClassifyLocalWithTables. r=Ehsan,francois
MozReview-Commit-ID: 8dvYM4o2Xxw

--HG--
extra : rebase_source : 7e7fabd8ec0a60115eca0c66c55ea0d0369911f1
2017-03-01 11:27:51 +08:00
Kirk Steuber 3d6bb088c9 Bug 1340448 - Fix intermittent timeout of browser_flash_block_lists.js r=Felipe
MozReview-Commit-ID: InSc42mWEJN

--HG--
extra : rebase_source : 4107cbf5dcdbb5ba0a02df9d920713ce0fed1ec9
2017-02-17 09:34:34 -08:00
Thomas Nguyen 44da8e9d43 Bug 1288633 - Add SafeBrowsing report false positive URL test.r=francois
MozReview-Commit-ID: JEMLug9M85Q

--HG--
extra : rebase_source : ec3d3c63b8508fd05274c7150b1115a62bfc8369
2017-02-21 11:25:04 +08:00
Thomas Nguyen 65d9ef988a Bug 1288633 - Add more information when an URL matches Safe Browsing list. r=dragana,francois
MozReview-Commit-ID: 6u0dUOB838F

--HG--
extra : rebase_source : 8800e60e6a3b787f1ebaeafb48057e3a3d509468
2017-02-21 09:46:36 +08:00
Henry Chang 2b62e1dabf Bug 1338970 - Introduce 2-step DB update scheme. (background update then swap in) r=francois,gcp
MozReview-Commit-ID: 4C9N0tuSso0

--HG--
extra : rebase_source : 80561fb0beec7fc9f6e852d81984b239ae62700e
2017-02-21 14:18:29 +08:00
dimi 154a17d29f Bug 1338082 - Add telemetry probes to track the positive and negative cache durations in V4. r=francois
MozReview-Commit-ID: 43Nf5bS2Uo

--HG--
extra : rebase_source : 909db55a9421c2fe55d29c10070bd4e104fd0692
2017-02-20 10:25:18 +08:00
Henry Chang 0d744f462c Bug 1313711 - Fix track element CORS bug. r=dveditz
MozReview-Commit-ID: SRWbiIuUdt

--HG--
extra : rebase_source : ecdedf2599205e547fbf6cafd12d154b2d7d26bc
2017-02-14 11:47:14 +08:00
Tom Tromey d2667a2b27 Bug 1060419 - make AppendPrintf and nsPrintfCString use Printf.h, r=froydnj
MozReview-Commit-ID: 2E8FoiNxU8L

--HG--
extra : rebase_source : 810ac727bef0751f24edea18c52e0ec170bf367d
2016-12-14 09:32:21 -07:00
Tom Tromey 38a0f29d29 Bug 1060419 - convert one nsPrintfCString to MOZ_LOG, r=froydnj
MozReview-Commit-ID: IFwMAtAgfRq

--HG--
extra : rebase_source : 9f125c20fd72c0fcb517738a4de6ffdcd758fdbc
2016-12-19 13:15:14 -07:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Tom Tromey f8ab4ddf02 Bug 1060419 - remove unneeded includes of prprf.h, r=froydnj
MozReview-Commit-ID: JifhpA3oOeH

--HG--
extra : rebase_source : 08460997dc3fd91f3065c718e17b41bb4acf8bae
2016-12-09 10:00:01 -10:00
Wes Kocher 017c515285 Merge inbound to m-c a=merge
MozReview-Commit-ID: IKI0zVtF1n9
2017-02-15 16:18:13 -08:00
Nathan Froyd 27c2477d25 Bug 1339556 - remove nsUrlClassifierUtils::Charmap; r=gcp
The current code doesn't use Charmap.
2017-02-15 09:29:42 -05:00
Kirk Steuber c1a68c2b4c Bug 1338287 - Make nsIDocument::DocumentFlashClassification accessible from privileged JS r=bz
MozReview-Commit-ID: 1II2puZMub5

--HG--
extra : rebase_source : 2b806b4f1d4e51b72799d79126c402113d5b072e
2017-02-13 13:39:40 -08:00
Sylvestre Ledru be2c7c246d Bug 1338086 - Remove useless else blocks in order to reduce complexity in toolkit/components/url-classifier/ r=francois
MozReview-Commit-ID: GTb9ME8pfVq

--HG--
extra : rebase_source : 5a0e422b685330005aa29c3785adee8fabccd73c
2017-02-09 10:57:22 +01:00
Thomas Nguyen fdfc58a406 Bug 1329558 - Implement Minimum wait duration for V4 gethash r=francois
MozReview-Commit-ID: 7i9Wz7pq0yJ

--HG--
extra : rebase_source : a02c2e3cbd5f535192f5dbaadabce16abd6bb35f
2017-02-09 16:56:44 +08:00
Tim Huang 756cf900c9 Bug 1336802 - Part 2: Updating the whole code base to make sure nsILoadInfo get null check. r=smaug
--HG--
extra : rebase_source : 22149fd540fd02119afe9fe5c9a815d01cf959c1
2017-02-07 11:49:34 +08:00
Kirk Steuber 20e41d2a09 Bug 1335549 - Enable table updates when flashblock pref is flipped r=francois
MozReview-Commit-ID: 4L5xP1lkL8d

--HG--
extra : rebase_source : b5b734d350be3fe6f4a446259bfa3e85cdf8e1d3
2017-02-07 11:12:11 -08:00
dimi 1f53a466a3 Bug 1336909 - Restrict URLCLASSIFIER_PREFIX_MATCH to profiles that have working V4. r=francois
MozReview-Commit-ID: L3lKgiohalH

--HG--
extra : rebase_source : 1ac11242c4db4b129fdb316deee92dd514b65f49
2017-02-08 15:18:35 +08:00
dimi d2bf537dff Bug 1336865 - Add telemetry to measure time spent on constructing variable-length prefix set. r=francois
MozReview-Commit-ID: CNhfYdH1ryA

--HG--
extra : rebase_source : 717724804d24d1396c8bd3d212e01c8a8a807be1
2017-02-07 16:14:58 +08:00
Francois Marier 6aef23a1fd Bug 1334616 - Add telemetry probe to monitor ClassifyLocalWithTables() perf. r=gcp
MozReview-Commit-ID: LfKovwAX9Ov

--HG--
extra : rebase_source : 744d1a1414fe4c2beb8a1bb604c1cd793e52c90d
2017-02-03 20:56:05 +08:00
Phil Ringnalda 049e9128c4 Backed out changeset 2e9eab35d1ea (bug 1334616) for bustage
CLOSED TREE
2017-02-06 22:04:16 -08:00
Francois Marier c8725aeef5 Bug 1334616 - Add telemetry probe to monitor ClassifyLocalWithTables() perf. r=gcp
MozReview-Commit-ID: LfKovwAX9Ov

--HG--
extra : rebase_source : a7b921cba7916b72fd67188662875cfd8c5ce7e2
2017-02-03 20:56:05 +08:00
Francois Marier 71cb8fa044 Bug 1336376 - Expand the range of values for URLCLASSIFIER_LOOKUP_TIME. r=bsmedberg
MozReview-Commit-ID: 9zh8mldBS7k

--HG--
extra : rebase_source : 35b77f5852847b82f46ac58ebfd66701d977940d
2017-02-03 20:30:08 +08:00
Henry Chang a835d0face Bug 1323953 - Send 4-byte prefix for both v2/v4 tables. r=francois
MozReview-Commit-ID: 1jlBdSQARNg

--HG--
extra : rebase_source : 94ca2da38a7aeae061a37cb9013b45dfefbcc843
2017-02-07 10:56:12 +08:00
Wes Kocher 79e705d4bd Backed out changeset 3a6b42b3d233 (bug 1336376) for build failures a=backout CLOSED TREE
MozReview-Commit-ID: L3oVRVqNDKj
2017-02-06 18:36:24 -08:00
Thomas Nguyen 144d51b0c6 Bug 1336005 - Add null check when releasing and shutting down background thread r=francois
MozReview-Commit-ID: HKlQLqQH2c9

--HG--
extra : rebase_source : 083c6ce7b44b1a01ce19e55af5e6355a39b8a017
2017-02-07 10:06:21 +08:00
Francois Marier e0494472bf Bug 1336376 - Expand the range of values for URLCLASSIFIER_LOOKUP_TIME. r=bsmedberg
MozReview-Commit-ID: 9zh8mldBS7k

--HG--
extra : rebase_source : af12b82a2fa18cf42d311ee9e11b72e799d3b131
2017-02-03 20:30:08 +08:00
Kirk Steuber 35d30a1e74 Bug 1333483 - Hardcode itisatrap manual testing URLs for Flash blocking into the SafeBrowsing module r=francois
MozReview-Commit-ID: ASCt3VfRJgg

--HG--
extra : rebase_source : 9c62b6fc16096a192aaf08e1a4e0307998cfe12d
2017-02-02 13:00:05 -08:00
Kirk Steuber a2a797193b Bug 1323064 - Remove Flash from navigator.plugins when Flash is blacklisted in the document r=bsmedberg
MozReview-Commit-ID: LKjCORgaecI

--HG--
extra : rebase_source : bf07e9da8e0bb1a899c6e81aa66149794aadf8d7
2017-02-02 10:03:51 -08:00
Kirk Steuber 4d0c6c3e0b Bug 1307604 - Add allow and deny lists for Flash Blocking r=bsmedberg,bz,francois
MozReview-Commit-ID: H2dgJX6Hsz7

--HG--
extra : rebase_source : 7b56241fcaf5f99b64f6ad40a9dc2676692f70d2
2016-11-22 15:01:04 -08:00
DimiL 46e51631a9 Bug 1331881 - Minimum wait duration and negative cache duration should be passed even if there is no match. r=francois,henry
MozReview-Commit-ID: K5RcpmiXFYR

--HG--
extra : rebase_source : 7d9c48c658fc04b0430965e93476063d3cff4a7f
2017-01-18 17:34:03 +08:00
Dimi Lee 9907b239c2 Bug 1332770 - Fix the google4 provider is showing up as other in some telemetry pings. r=francois
MozReview-Commit-ID: KbpYAnf6qxd

--HG--
extra : rebase_source : fe524ca5afbd1b8b08b80198eeb43db5f84f677e
2017-01-27 18:02:36 +08:00
Florian Quèze 2cf30507bd Bug 1334261 - script-generated patch to remove more newURI null parameters, r=jaws. 2017-01-27 10:51:02 +01:00
Florian Quèze be4dbae285 Bug 1334199 - script-generated patch to omit getComputedStyle's second argument when it's falsy, r=jaws. 2017-01-27 10:51:02 +01:00
Dimi Lee c6aec3beb1 Bug 1333257 - Only cache V2 misses when doing Safe Browsing lookups. r=francois
MozReview-Commit-ID: 6kvM6z5OnPw

--HG--
extra : rebase_source : c180ac1b6c840a6112f72abe3b7984503fad7082
2017-01-26 11:36:52 +08:00
Florian Quèze 0e0865f4fc Bug 1331599 - script-generated patch to replace removeEventListener calls with the once option when possible, r=jaws. 2017-01-25 07:01:52 +01:00
Henry Chang 27430a3b9e Bug 1332218 - Add boundary checks for array access in nsUrlClassifierPrefixSet::GetPrefixesNative. r=francois.
MozReview-Commit-ID: CpQYdTaEI3c

--HG--
extra : rebase_source : e8cf42835149dbf25150c734a339e0d70b432bc5
2017-01-19 17:48:44 +08:00
Henry 4f731551c1 Bug 1332213 - Store the update stream duplicately in v2 protocol parser. r=francois.
MozReview-Commit-ID: dPbvro5xIa

--HG--
extra : rebase_source : 911291a89531bbe55490f38b094015fcd6664562
2017-01-19 17:16:13 +08:00
dimi 4f2ec370e6 Bug 1328821 - hash completion request for v4 should not depend on table freshness. r=francois,henry
MozReview-Commit-ID: EIjDrnj1I4S

--HG--
extra : rebase_source : 83be77637f14753a8baf008af65c44e83b93508c
2017-01-17 08:33:08 +08:00
Henry Chang 6bca0ecbd1 Bug 1331534 - Temporarily ignore v4 hash completion result. r=francois
MozReview-Commit-ID: 9P68EP5CWG4

--HG--
extra : rebase_source : fe90582db602a8e62505dcb81dd377480a644af5
2017-01-18 16:49:57 +08:00
Mark Banner 16e6d381ac Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps
MozReview-Commit-ID: 62Hp5ISxowJ

--HG--
extra : rebase_source : daa8efb3409031fea553f4fd0c9d0746e38dc308
extra : histedit_source : b4c23aacf678ba0d0ac9c09191a7c494ead11a08
2017-01-18 10:30:39 +00:00
Ryan VanderMeulen 78cc07597f Merge m-c to autoland. a=merge 2017-01-17 11:32:39 -05:00
Florian Quèze 85611a7b6d Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws.
--HG--
extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
2017-01-17 11:50:25 +01:00
Mark Banner 34bd93ded7 Bug 527444 - use do_register_cleanup calls instead of tail_*.js files in xpcshell, in Core and Toolkit. r=Paolo.
Patch originally by Rahid Hasan. Updated by Akshendra Pratap Singh, jdm and Standard8.

MozReview-Commit-ID: F0edTCSsXzy

--HG--
extra : rebase_source : 7123a8162a4cdbcfb08f9a765d158e179c46b202
2017-01-12 16:09:58 +00:00
Thomas Nguyen 555edcf6af Bug 1324820 - Make sure we resume the channel if there's no classifier callback r=gcp
MozReview-Commit-ID: 35jBJb1Q8Rz

--HG--
extra : rebase_source : 63ae672ec3c9851b0f11ce42ecc76a9dbf4e7826
2017-01-12 18:07:22 +08:00
Thomas Nguyen 2e4a2a1c26 Bug 1311926 - Add telemetry to measure gethash error and gethash timeout rate for V2 and V4. r=francois
MozReview-Commit-ID: 5mfO5zJMFyW

--HG--
extra : rebase_source : 3d1b178d42e1e084b0fa522ed90a44affe70bb8d
2017-01-16 11:22:45 +08:00
Dimi Lee 2dae4fbcea Bug 1329593 - Compiling with mingw-w64 is broken with conflict-with-previous-declaration errors. r=gcp
--HG--
extra : rebase_source : 07e5b745c371aeca4de55abd2a99b61c915113f0
2017-01-12 23:00:22 +08:00
Andrea Marchesini 359ae91eac Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
Florian Quèze 34e970eb9b Bug 1329182 - remove trailing newURI null parameters in toolkit/, r=jaws. 2017-01-09 20:27:25 +01:00
Markus Stange 692210bd80 Bug 1323100 - Assign names to all remaining threads that are created through NS_NewThread and create them using NS_NewNamedThread instead. r=froydnj
MozReview-Commit-ID: 7W1dt2BBKJZ

--HG--
extra : rebase_source : c7e335dac2e0f02782f0eb229a7181c8d01317a2
2016-12-21 11:43:50 +01:00
dimi bcd217b3c0 Bug 1320402 - Move url-classifier off of using appIds. r=ehsan, gcp
MozReview-Commit-ID: IqnAVrv2c9W
2017-01-03 14:21:58 +08:00
Ehsan Akhgari a0fd21a161 Bug 1321874 - Part 2: Use the passive tracking protection API to determine whether a script is tracking; r=bkelly 2016-12-23 15:38:43 -05:00
DimiL 0982fa5eff Bug 1321834 - Use iterators instead of Elements() in RemoveMatchingPrefixes. r=francois,froydnj
MozReview-Commit-ID: 5YKF1lGL0hp

--HG--
extra : rebase_source : 1ff45b29cb35f6102dbb9bdbd01b98457860e621
2016-12-20 09:58:45 +08:00
Wes Kocher b5f33578be Merge m-c to inbound, a=merge 2016-12-20 11:47:17 -08:00
Ehsan Akhgari 35e93a7bdf Bug 1312514 - Part 3: Add a test to ensure that timeouts from tracking scripts end up in the tracking bucket; r=bkelly
For simplicity, this test is being added to test_classifier.html which
already has all of the infrastructure necessary for setting up a test
domain as a tracking domain.
2016-12-20 12:40:30 -05:00
DimiL c34f7dfa1b Bug 1311910 - Add telemetry to measure update error and update timeout rate for V2 and V4. r=francois,henry
MozReview-Commit-ID: JL4aZrUOGH7

--HG--
extra : rebase_source : 6945d007bc3e317903837e6cf546935346925433
2016-12-19 09:43:02 +08:00
Henry Chang 5401fe7ad1 Bug 1312339 - LookupResult to support variable length partial hash. r=francois
MozReview-Commit-ID: DKwNCNKJAW

--HG--
extra : rebase_source : 082c8a1d88a00f0d568c56c7ed7214c0b0ed20ef
2016-12-16 14:34:32 +08:00
Henry Chang 758d80f10b Bug 1276826 - Part 2. Send gethash request and handle gethash response for v4. r=francois
MozReview-Commit-ID: 6fIbN6a6gHI

--HG--
extra : rebase_source : d64a2b4f85b24aac0a847a46748b3b3fdf0db749
extra : intermediate-source : c486204319c1afc158b871bad7edd2f7a565022a
extra : source : adf76dccec9d51df0d3a659ffa3dd201d8115bc4
2016-11-28 14:55:36 +08:00
Henry Chang 156d495c02 Bug 1276826 - Part 1. Implement function to build FindFullHash request for v4. r=francois
MozReview-Commit-ID: 6hi97T9Jk7s

--HG--
extra : rebase_source : 88230951465e3efc94c2d2efa6d28540e7937c09
2016-11-28 14:54:49 +08:00
Michael Layzell c6fccac579 Bug 1299489 - Change nsTArray to use a custom iterator based on index instead of pointers to improve iterator invalidation safety of ranged for loops, r=froydnj
MozReview-Commit-ID: CahPOcRYvES
2016-12-08 15:54:45 -10:00
Kershaw Chang ccfc159353 Bug 1141814 - Part 1: Enable to update TP list if TP is disabled. r=francois 2016-11-30 23:12:00 -05:00
Francois Marier 15e7ab840a Bug 1315387 - Cancel hash completer timeout timer when requests complete. r=gcp
MozReview-Commit-ID: 8cFc7YrxOoC

--HG--
extra : rebase_source : b7061e503cad9077a09fd65bfb20b9a5cc212471
2016-11-24 16:39:36 +13:00
Kirk Steuber 1cf7b0a540 Bug 1321377 - When called from the content process, ClassifyLocalWithTables should return failure instead of causing an IPC error r=Ehsan,francois
MozReview-Commit-ID: B1RemxGRSKB

--HG--
extra : rebase_source : e99ba20a9613bde31d9e7adbf94b5596e6adcd7d
2016-11-30 10:57:48 -08:00
Kirk Steuber 0ddd366738 Bug 1319571 - Change the output format of nsUrlClassifierDBService::ClassifyLocalWithTables from comma separated string to an array of strings r=francois
MozReview-Commit-ID: TXln2EQnZS

--HG--
extra : rebase_source : 520527fabc9d92dc7dc1ec670e79861d03449ca2
2016-11-29 13:04:43 -08:00
Thomas Nguyen 493ff90f5c Bug 1315386 - Make Safe Browsing code more shutdown-aware. r=francois,gcp.
MozReview-Commit-ID: ATCVfh5YLZl

--HG--
extra : rebase_source : d87cfae3838f1a26dc67d2546264e47768011a63
2016-11-25 16:02:37 +08:00
Carsten "Tomcat" Book 4945f89da4 Merge mozilla-central to autoland
--HG--
rename : browser/base/content/test/general/browser_bug1064280_changeUrlInPinnedTab.js => browser/base/content/test/tabs/browser_navigatePinnedTab.js
rename : js/src/jit-test/tests/wasm/spec.js => js/src/jit-test/tests/wasm/wast.js
extra : rebase_source : 30ebe4e98435a1fd70b26908584d608587d969d9
2016-11-24 16:47:36 +01:00