author i.milind.luthra+590334 <i.milind.luthra@gmail.com>
Thu, 11 May 2017 17:22:27 +0200
changeset 357847 8840f2afc5f942d73384ddcc7e4456a53408b619
parent 325416 b0dae693fdbc687830ee450a88beec616c43f673
child 362818 97d503af98d9ac9e6fdba3d8c7f2ffc6c74bac27
permissions -rw-r--r--
Bug 1249263 - add a `removeByFilter` method to filter by host and time,r=mak Added a method in History to filter by host and timeframe, which is designed to act as a replacement for `RemovePagesByTimeFrame` and `RemovePagesFromHost` in the old API. The `filter` object accepts both a host argument, as well as a timeframe, and filters as per one or both of them. This also moves certain code (the method `validatePageInfo` and methods it uses) from History to PlacesUtils such that we can use it for testing as well, and modifies the method to take another parameter which decides whether the visits inside the pageInfo need to be validated as well (since the pageInfo returned from History.jsm::`remove` and History.jsm::`removeByFilter` do not pass a visits array in their callback functions. Shifts `ensureDate` and `isValidTransitionType`(now renamed to `isValidTransition`) inside the history object. MozReview-Commit-ID: EQAHmjf7131

# See http://pep8.readthedocs.io/en/latest/intro.html#configuration
ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402
max-line-length = 99
filename = *.py, +.lint