Remove/simplify the POSIX SharedMemory::Create() a bit.
Remove/simplify the POSIX SharedMemory::Create() a bit.

This gets called on the IO thread. On Mac, operations done on a real
(disk-backed) filesystem (not a RAM/swap-backed tmpfs), and are slow:
  - Use unlink() directly instead of file_util::Delete(). This saves a stat
    (which is used to determine if the target is a directory or not).
  - Don't bother doing the fseeko(). This is unneeded, since mmap() takes an
    absolute offset. (ftruncate() will grow files both on Linux and Mac. On
    non-XSI POSIX systems where this is not the case, the seek alone isn't
    sufficient to grow the file in any case.)
Both these show up on a profile of a big session restore on Mac (though
unfortunately the bulk of the time is spent in mkstemp() and its internal file
open). (There's still a redundant stat, perhaps to be taken care of later.)


Review URL: https://chromiumcodereview.appspot.com/12089054

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

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