Make IsHostPortUsed() handle ports bound by foreign UIDs.
Make IsHostPortUsed() handle ports bound by foreign UIDs.

lsof -np is not able (permission denied when running as non-root to be exact)
to retrieve file descriptor information for processes running under a different
UID. This can make IsHostPortUsed() return false when the provided port is
actually used.
Trying to connect to a port rather than binding it should not introduce any
side-effect on the system that could affect next runs as the TODO suggested. It
is also always sane not to depend on an external process (lsof) output format.

BUG=229685
R=bulach@chromium.org

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

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@198683 0039d316-1c4b-4281-b951-d872f2087c98

Fireblend/chromium-crosswalk,littlstar/chromium.src,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,hujiajie/pa-chromium,Chilledheart/chromium,littlstar/chromium.src,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,ChromiumWebApps/chromium,hujiajie/pa-chromium,ondra-novak/chromium.src,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,patrickm/chromium.src,Just-D/chromium-1,hujiajie/pa-chromium,Just-D/chromium-1,Just-D/chromium-1,markYoungH/chromium.src,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,ChromiumWebApps/chromium,M4sse/chromium.src,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,jaruba/chromium.src,chuan9/chromium-crosswalk,dushu1203/chromium.src,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,axinging/chromium-crosswalk,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,mogoweb/chromium-crosswalk,patrickm/chromium.src,jaruba/chromium.src,dednal/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,anirudhSK/chromium,chuan9/chromium-crosswalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,hujiajie/pa-chromium,anirudhSK/chromium,Fireblend/chromium-crosswalk,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,bright-sparks/chromium-spacewalk,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dednal/chromium.src,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,dednal/chromium.src,dednal/chromium.src,pozdnyakov/chromium-crosswalk,dednal/chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,Jonekee/chromium.src,dushu1203/chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,Just-D/chromium-1,jaruba/chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,anirudhSK/chromium,ltilve/chromium,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,littlstar/chromium.src,M4sse/chromium.src,Just-D/chromium-1,ChromiumWebApps/chromium,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,anirudhSK/chromium,chuan9/chromium-crosswalk,Jonekee/chromium.src,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,littlstar/chromium.src,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,anirudhSK/chromium,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,dushu1203/chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,Just-D/chromium-1,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ltilve/chromium,hujiajie/pa-chromium,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,markYoungH/chromium.src,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,littlstar/chromium.src,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,ltilve/chromium,littlstar/chromium.src,axinging/chromium-crosswalk,dushu1203/chromium.src,ChromiumWebApps/chromium,Chilledheart/chromium,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,patrickm/chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,markYoungH/chromium.src,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,M4sse/chromium.src,ondra-novak/chromium.src,anirudhSK/chromium,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,Just-D/chromium-1,hgl888/chromium-crosswalk,littlstar/chromium.src,mogoweb/chromium-crosswalk,littlstar/chromium.src,ondra-novak/chromium.src,fujunwei/chromium-crosswalk