Use sockets with unread data if they've never been used before.

This fixes preconnects to SPDY-capable origins.  StreamSocket's semantics
change slightly. WasEverUsed() for layered sockets is now whether the top-level
socket has read or written user data, rather than whether the underlying
transport socket was used.

Change SSL and SOCKS socket implementations to use the new WasEverUsed()
semantics. This doesn't affect SOCKS much except that preconnect misses now
time out more aggressively. For SSL, it fixes the SPDY issue.

Add tests for SSL socket and socket pool implementations.

BUG=334467

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259671 0039d316-1c4b-4281-b951-d872f2087c98
Remove Has{Audio,Video}(), GetInitialNaturalSize() from media::Pipeline.

This splits PipelineBufferingStateCB in two: PipelineMetadataCB, which
includes the available tracks and natural size in a PipelineMetadata
struct; and PipelinePrerollCompleted, with no parameters. Now
WebMediaPlayerImpl can cache the metadata and the accessors are not
required.

This was previously committed as r259154 and r259385.

BUG=148541

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259672 0039d316-1c4b-4281-b951-d872f2087c98
Revert of Add a check to the FindBadConstructs.cpp clang plugin for bad enum last values. (https://codereview.chromium.org/150943005/)

Reason for revert:
Caused crbug.com/356815 and crbug.com/356816 and doesn't have a flag to turn it off.

Original issue's description:
> Add a check to the FindBadConstructs.cpp clang plugin for bad enum last values.
> 
> One common coding patern is to define an enum as in:
>   enum Color { RED, GREEN, BLUE, COLOR_LAST=BLUE };
> but this is fragile when someone adds a new constant and forgets
> to update the COLOR_LAST constant.
> 
> This change looks for enums that have a xxx_LAST or xxxLast member,
> and warns if there are any higher-valued constants present.
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251894

TBR=erg@google.com,darin@chromium.org,erg@chromium.org,tsepez@chromium.org
NOTREECHECKS=true
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259675 0039d316-1c4b-4281-b951-d872f2087c98
Revert 259425 "Revert 259375 "Fix tab capture with Mac software ..."

This was reverted because of a crash in 
VideoCaptureDeviceTest.FakeCaptureVariableResolution, but it looks like
that test is a flake (crbug.com/344108).

> Revert 259375 "Fix tab capture with Mac software compositor again"
> 
> > Fix tab capture with Mac software compositor again
> > 
> > Make sure that notification messages aren't dropped.
> > 
> > Again, in principle, we should create a new notification to send
> > indicating a software frame, but, again, this has to be merged to
> > a long-diverged branch. Also, Mac will soon be on a delegated
> > renderer and this will all be moot.
> > 
> > BUG=333986
> > 
> > Review URL: https://codereview.chromium.org/199663005
> 
> TBR=ccameron@chromium.org
> 
> Review URL: https://codereview.chromium.org/207823005

TBR=ccameron@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259676 0039d316-1c4b-4281-b951-d872f2087c98
Improve a comment.

BUG=349158

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259678 0039d316-1c4b-4281-b951-d872f2087c98
Added a shortcut (Ctrl+Alt+N) for showing network config screen in during kiosk launch even if network connectivity is present. 

BUG=350065
TEST=added KioskTest.LaunchAppWithNetworkConfigAccelerator

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259679 0039d316-1c4b-4281-b951-d872f2087c98
Delete net/tools/fetch. No one is using this.

BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259680 0039d316-1c4b-4281-b951-d872f2087c98
Always list EthernetEAP as a Favorite for debugging

Because EthernetEAP is never a visible service, we do not observe it.
When it is first created, no properties (including Profile) are set, so
it does not appear in the 'Favorite' list and as a result never gets
updated. This currently only affects debugging.

As a workaround, we always treat EthernetEAP networks as a Favorite,
eveb if Profile is empty.

BUG=355117
R=pneubeck@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259682 0039d316-1c4b-4281-b951-d872f2087c98
Use active user profile instead of signin screen webui profile for tooltip.

BUG=353460

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259683 0039d316-1c4b-4281-b951-d872f2087c98
Settings API first-run bubble.

Pop up a bubble the first time a user encounters that the settings have been changed by an extension.

Settings includes: home page, search engine or startup pages.

BUG=356204
R=mad@chromium.org, pkasting@chromium.org, yoz@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259684 0039d316-1c4b-4281-b951-d872f2087c98
Remove NOTIMPLEMENTED from DelegatingRenderer::SendManagedMemoryStats

This doesn't need an implementation.

BUG=
R=danakj@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259685 0039d316-1c4b-4281-b951-d872f2087c98
Bail out early in ClearBrowserDataHandler::HandleClearBrowserData instead of DCHECKing.

See the bug for details.

BUG=354931

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259686 0039d316-1c4b-4281-b951-d872f2087c98
[Android] Reland Select dialog fix lost in refactoring.

A crash fix landed in https://codereview.chromium.org/86823002/ seems
to have been lost in the refactoring that landed in
https://codereview.chromium.org/54603012 .

Reland the crash fix.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259687 0039d316-1c4b-4281-b951-d872f2087c98
Cherry pick r522 from upstream protobuf

Add arm64 atomicops to protobuf.

BUG=354405

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259688 0039d316-1c4b-4281-b951-d872f2087c98
Revert 259663 "Version 7 golden file for safe-browsing test."

This breaks unit_tests on Android Tests (dbg):
http://build.chromium.org/p/chromium.linux/builders/Android%20Tests/builds/12751/steps/unit_tests/logs/stdio

ADB command fails to upload the file with spaces in the name.

> Version 7 golden file for safe-browsing test.
> 
> Landing a binary file which will be used by later checkin.  See
> https://codereview.chromium.org/211363005/
> 
> No impact expected to any existing code.
> 
> BUG=351448

TBR=shess@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259689 0039d316-1c4b-4281-b951-d872f2087c98
ui: Clang format and general style cleanup of GLImage code.

BUG=
TBR=piman

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259690 0039d316-1c4b-4281-b951-d872f2087c98
Allow unhandled ui events to be dispatched to other targets

Add a method FindNextBestTarget() to EventTargeter which will return
the next-best target for an unhandled event. The default implementation
returns null, but this will be overridden in the upcoming
ViewTargeter class.

Change the logic in EventProcessor::OnEventFromSource() to allow
for a event to be dispatched to the next-best target if the previous
target (or any pre/post target handlers of the target or its
ancestors) did not handle the event. This change is currently a
no-op, but it will eventually be used once a ViewTargeter is
introduced and the views event handling and dispatch code is refactored
for individual event types.

BUG=353624
TEST=EventProcessorTest.DispatchToNextBestTarget,EventProcessorTest.HandlerSequence

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259691 0039d316-1c4b-4281-b951-d872f2087c98
Remove dead code.

BUG=none
TEST=none
R=viettrungluu@chromium.org
TBR=viettrungluu

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259693 0039d316-1c4b-4281-b951-d872f2087c98
Roll WebRTC to r5793

R=ronghuawu@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259694 0039d316-1c4b-4281-b951-d872f2087c98
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259696 0039d316-1c4b-4281-b951-d872f2087c98