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

71 Коммитов

Автор SHA1 Сообщение Дата
Mark Banner 691543ee89 Bug 1486739 - Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/. r=mossop
Automatic changes by ESLint, except for manual corrections for .xml files.

Differential Revision: https://phabricator.services.mozilla.com/D4439

--HG--
extra : moz-landing-system : lando
2018-08-31 05:59:17 +00:00
Kris Maglione a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
DimiL 6b0977cc01 Bug 1254323 - Reduce identical gethash requests done by the URL Classifier. r=gcp
MozReview-Commit-ID: KNNL1dBqXx0

--HG--
extra : rebase_source : fd18c3dac2a9fc331f78d492154283472ec2957d
2018-02-14 16:12:29 -08:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Florian Quèze 2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
DimiL fc50fe21a9 Bug 1421500 - Disable back-off for SafeBrowsing testcases not testing back-off. r=francois
After this patch landed, we will have 3 cases:
1. For providers are not "test", for example, google, google4, mozilla ... etc
   backoff CANNOT be disabled.
2. For "test" provider, if preference "browser.safebrowsing.provider.test.disableBackoff" is ON
   backoff is disabled.
3. For "test" provider, if preference "browser.safebrowsing.provider.test.disableBackoff" is Off
   backoff is NOT disabled.

So if your testcase will use listmanager or hashcompleter, you should try to use "test" provider
if possible, otherwise testcase may encounter intermittent failure due to backoff.

MozReview-Commit-ID: 3BDxs0ARyQM

--HG--
extra : rebase_source : 1736abe307849089d68f0f2b1a0127b9b465abed
2017-12-08 12:18:34 +08:00
Csoregi Natalia 3257faa639 Backed out changeset 2467ce87767e (bug 1421500) for ESLint failure /toolkit/components/url-classifier/nsUrlClassifierLib.js:108. r=backout on a CLOSED TREE 2017-12-14 04:38:07 +02:00
DimiL 9e0fa6963a Bug 1421500 - Disable back-off for SafeBrowsing testcases not testing back-off. r=francois
After this patch landed, we will have 3 cases:
1. For providers are not "test", for example, google, google4, mozilla ... etc
   backoff CANNOT be disabled.
2. For "test" provider, if preference "browser.safebrowsing.provider.test.disableBackoff" is ON
   backoff is disabled.
3. For "test" provider, if preference "browser.safebrowsing.provider.test.disableBackoff" is Off
   backoff is NOT disabled.

So if your testcase will use listmanager or hashcompleter, you should try to use "test" provider
if possible, otherwise testcase may encounter intermittent failure due to backoff.

MozReview-Commit-ID: 3BDxs0ARyQM

--HG--
extra : rebase_source : 84250bc7aab28a896afb2d47f98435139139c1f3
2017-12-08 12:18:34 +08:00
Francois Marier 1e487450bd Bug 1421803 - Send ThreatHit requests and telemetry at the right time. r=dimi
The ThreatHit requests were never being sent because SetMatchedInfo() was
called on the channel _after_ calling SendThreatHitReport().

Additionally, the telemetry was sent in OnStartRequest() and so errors
returned in OnStopRequest() would not be caught.

This patch also includes some improvements to the logging of these
requests which can be toggled using:

    MOZ_LOG="UrlClassifierDbService:5,nsChannelClassifier:5"

MozReview-Commit-ID: 9dtRgEPVS3g

--HG--
extra : rebase_source : 6d0e4b745e203a54489ddd479935d008ab9a82d7
2017-11-28 12:10:37 -08:00
Mark Banner 4de6bf22b1 Bug 1411368 - Automatically fix no-multi-spaces issues raised when using ESLint 4. r=mossop
MozReview-Commit-ID: H5YVp3rnzGo

--HG--
extra : rebase_source : 5b45b6c0df834131812d094e975047eaad374e06
2017-10-26 11:47:01 +01:00
DimiL e246eef04f Bug 1384405 - Dump request payload for V2 400 responses. r=francois
Refactor SafeBrowsing code so we can get the payload of gethash/update request when
updates fail.

MozReview-Commit-ID: NB1oacd185

--HG--
extra : rebase_source : 87e7ce94fd5cde9697946a00de90a821e5561168
2017-10-05 08:37:29 +08:00
Thomas Nguyen d721de8d81 Bug 1389315 - Isolate Safe Browsing completions cached by each provider. r=francois
MozReview-Commit-ID: INiuM5ydv2f

--HG--
extra : rebase_source : 376fa8f04d850d23e8de908e8a3484350269a671
2017-09-14 17:05:52 +08:00
Thomas Nguyen f00e12c4b7 Bug 1403473 - Init loggingEnable for hashcompleter r=dimi
MozReview-Commit-ID: 1BpErwmbgCM

--HG--
extra : rebase_source : 784991ded277860318c3d91e34e4aca0b7eaf105
2017-09-27 16:49:02 +08: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
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
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 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
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
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
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 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
Sebastian Hengst 159215e6f4 Backed out changeset 18d45aa984d6 (bug 1355161) 2017-04-14 23:39:23 +02:00
Sebastian Hengst a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Sebastian Hengst 9e0ecf32c5 Backed out changeset e1f191aad863 (bug 1356569) 2017-04-14 23:39:17 +02:00
Florian Queze 93a734a3ce Bug 1356569 - Remove appendElement's last parameter when it is false, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Florian Queze a363fb8c8b 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
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
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
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
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
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
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
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
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
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
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
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
Henry Chang 67a1e7c43b Bug 1273398 - Part 3: Modify "hash completer" to use RequestBackoffV4. r=francois. 2016-06-06 20:17:00 +02:00
Henry Chang 33e58f1836 Bug 1264517 - Replace sensitive info from debugging message. r=gcp. 2016-04-29 13:53:31 +08:00
Dimi Lee 9c4398499b Bug 1172688 - Add telemetry for when gethash calls timeout. r=francois, r=bsmedberg
MozReview-Commit-ID: 8GZmlhgWhmy

--HG--
extra : transplant_source : %F6%D2%9F%7B%A0%0D%F0%B8%8C%89%90%D1X%1E%AD%C5%D7%0B%07%7F
2016-04-06 11:35:26 +08:00
Francois Marier 5306fd5619 Bug 1164518 - Better logging of completions. r=gcp
MozReview-Commit-ID: JqhDC9GzB8l

--HG--
extra : rebase_source : c174046a80d128053adbcc9ca498a14c1f381ca0
2016-03-02 14:54:59 -08:00
Gian-Carlo Pascutto effecd5ec1 Bug 1150921 - Add telemetry for response codes to SafeBrowsing requests. r=francois f=bsmedberg 2016-02-10 17:59:40 +01:00