Reland of r240982:
commit39a76c066b248c7e287d6646815b8870f329e847
authorimcheng@chromium.org <imcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 19 Dec 2013 02:18:54 +0000 (19 02:18 +0000)
committerimcheng@chromium.org <imcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 19 Dec 2013 02:18:54 +0000 (19 02:18 +0000)
tree41c84b02b1967d2f5d972bf0ffe5969a7395e1a5
parent33829522c19271e67c00c4fff97b1bf7693f2274
Reland of r240982:

- Retaining the ChromeOS specific code to find the ip address to bind.
- Added more logging to help debugging.
- Finish discovery if there are no valid interfaces to bind to.
- Reordered the starting of the finish timer to be more consistent with original design
- Added missing initialization of the discovery_active_ field which was the cause of the bug of not being able to find any dial devices sometimes.

hshi@ helped me verify that DIAL works again on ChromeOS.
I built Chromium on Mac and also verify it works.

BUG=300113

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241764 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/extensions/api/dial/dial_service.cc
chrome/browser/extensions/api/dial/dial_service.h
chrome/browser/extensions/api/dial/dial_service_unittest.cc