Merge "Second batch of permission in-process API refactoring."