Files.app: Fix a bug of changing directory.

Changing directory is asynchronous step, but previously it does not care about
the previous requests to change directory. Thus the following code path is
possible.

1. Request change directory to A.
2. Request change directory to B.
3. Request of B is done.
4. Request of A is done.

This causes the flakiness of browser_tests.  This CL adds a sequential number to
check the order of requests and make only the latest request be accepted.

BUG=328775
TEST=browser_tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240896 0039d316-1c4b-4281-b951-d872f2087c98
Handle the case of an empty sourceId being set in constraints.

BUG=328689
TEST=Use a debug build of Chrome and go to http://simpl.info/getusermedia/sources/index.html.  We should not hit a dcheck.
NOTRY=True

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240897 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 240897
Checking for Fake Device usage in MSM to before enumerating.

In MediaStreamManager, activation of Fake device(s) is done at
GenerateStream, but the devices have already been enumerated at
StartEnumeration(), move Fake activation there.

BUG=326460

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240898 0039d316-1c4b-4281-b951-d872f2087c98
Make DoClose() abort throttling and TCP connection attempt

- the state waiting for TCP connect completion is
  STATE_TCP_CONNECT_COMPLETE. Not STATE_TCP_CONNECT
- DoClose() should run DoLoop() with ERR_ABORTED for
  STATE_RESOLVE_PROTOCOL_COMPLETE. delegate_ is running
  OnStartOpenConnection, but it can abort itself on OnClose() call

BUG=none

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

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