Bug 837242. Part 1: Convert bool parameters to flags. r=mats