[Reland] Add vector of intervals range checking to Time Restrictions policy
* Add function GetEndOfCurrent interval to obtain the last end of the interval which contains the current time. * Add function MaterializeIntervalsToLocalTimezone, which materializes the given intervals to the current local timezone. * Add function TimeIsInsideCrosSettingsIntervals, which checks if the current time is inside the intervals set in cros settings. It then returns the localized string of the end of the interval that contains the current time. This is a reland of CL:1132676 which fixes memory leaks that lead to a revert (revert was CL:1172003). BUG=chromium:852860 TEST=added unittests Change-Id: I8ad01d4ab90d4e699e4b7377c24e4932513ebe1b Reviewed-on: https://chromium-review.googlesource.com/1172128Reviewed-by:Maksim Ivanov <emaxx@chromium.org> Commit-Queue: Pavol Marko <pmarko@chromium.org> Cr-Commit-Position: refs/heads/master@{#582892}
Showing
Please register or sign in to comment