Refactor SyncInternalsUI

Refactor the SyncInternalsUI to have it explicitly register to receive
certain messages, rather than overriding OverrideHandleWebUIMessage in
order to receive all of them.

This forces us to define the set of handled messages in the JsBackend
and sync_internals_ui.cc.  This a temporary regression as we attempt to
reduce our reliance on the JsBackend, which is an important step towards
implementing crbug.com/328606.

This new registration method is much more strict than the old one.  If
the WebUI handler receives a call for an unregistered function, it will
pass over a NOTREACHED().  I don't expect this will be a problem, since
our JavaScript code should never invoke an unregistered function.

BUG=316378,328606

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242979 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 242979
ash: Avoid jank when signing in with 24-hour-clock.

Make ash's SystemTrayDelegate avoid always updating the time
format in response to LoggedInStateChanged().

Otherwise, when logging in to the owner account on a machine
that's set to 24-hour time, the system tray briefly reverts
to 12-hour time. This seems to happen as a result of
LoggedInStateChanged() getting called before the owner's
profile has actually been loaded.

Note that the system tray's time format is still updated
slightly later via SetProfile().

BUG=278601,317745
TEST=set owner to use 24-hour time. log in as both the owner
     and a non-owner and verify that the system tray's time
     format isn't updated unnecessarily

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

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242981 0039d316-1c4b-4281-b951-d872f2087c98
content: Copy layout test helpers from Blink to Chromium.

It just copies the source files first, the gyp changes will come next.

BUG=331304
TEST=None, no functional changes yet.
R=jochen@chromium.org
NOTRY=true

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

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