Use base::string16 for CompositionText.Text instead of converting to utf-8 and back unnecessarily.

BUG=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251322 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 251322
Dynamically set CAOpenGLLAyer to be asynchronous

The supported non-blocking path for drawing content that updates on the
order of 60fps is to create a CAOpenGLLayer and set its asynchronous
property to YES. In practice, just calling setNeedsDisplay about
about 60fps results in noticeable jank.

The downside to setting the CAOpenGLLayer to be asynchronous is that it
will be asked, every vsync, if it has anything new to draw (via the
canDrawInOpenGLContext callback), resulting in high CPU usage, even
when idle.

The solution to this is to dynamically set the isAsynchronous property
to YES when new frames are seen, and leave it at NO when it has been a
while (defined as a quarter second arbitrarily) since a new frame has
been generated.

Note that when a new frame is generated, the gotNewFrame call is made,
while when a re-display is required (say, because the window became
visible), only setNeedsDisplay is called. This is to avoid going in to
asynchronous mode unnecessarily.

Also note that the DelayTimer object is hung off the RWHVMac class
instead of the CompositingIOSurfaceLayer object. This is because
the DelayTimer class requires a C++ class to hang off of, instead of an
Objective C interface.

BUG=340133

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251323 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 251323
[SyncFS] Check MetadataDatabase availability before database operation

This should fix NULL pointer access failure on app reload.

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

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