[VK] Code refactor for pixel perfect algorithm.


BUG=342796

Review URL: https://codereview.chromium.org/139173013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250516 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 250516
Media Galleries API Scanning: Give cached scan results if no user gesture.

BUG=161119

Review URL: https://codereview.chromium.org/141203004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250517 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 250517