Only report timings for PrefHashFilter::FilterSerializeData() if work is done.

Move timing histograms for PrefHashFilter into PrefHashFilter itself.

BUG=330908

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248260 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 248260
Fix GpuTabTest.testScreenshotSync in CoreAnimation.

In the process of this, consolidate the latency info tracking used
by the software and hardware paths.

The test GpuTabTest.testScreenshotSync and numerous pixel
tests depend on getting screenshots of the window. These
screenshots are taken in the ui::GrabViewSnapshot function,
which calls CGWindowListCreateImage. The expectation of these
tests is that the contents grabbed using those functions be the
pixels rendered by the compositor.

Without CoreAnimation, we trigger this screen grab immediately
after calling CGLFlushDrawable on the contents area, which
satisfies the assumptions of tests.

With CoreAnimation, we draw the contents of the window in the 
CompositingIOSurfaceLayer::drawInCGLContext callback. It is then
the responsibility of CoreAnimation and the window server to put
the contents on the screen. As far as I have found, there is no way
to know when that actually happens.

To work around this, repeatedly re-draw the CALayer a fixed number
of times, and report that the contents are on the screen after that
cycle is complete. Note that each drawing cycle involves calling
CompositingIOSurfaceLayer::setNeedsDisplay, and then waiting until
the CompositingIOSurfaceLayer::drawInCGLContext call is made.

I found empirically that 6 of these cycles is necessary to not fail any
of the stress tests, so I doubled the number of cycles to 12.

BUG=245900

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248261 0039d316-1c4b-4281-b951-d872f2087c98
Remove empty directories in chrome/browser/resources.


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