Don't reuse profiles that are pending deletion
Don't reuse profiles that are pending deletion

This CL fixes a bug with the following change of events:
  - delete a profile (for example, "Profile 4")
   - run ./chrome.exe --profile-directory="Profile 4"
   - use Profile 4 and watch bad things happen

I added a guard to the profile creation function to prevent profiles that are pending deletion from being reused. This should avoid the above scenario.

BUG=114628
TEST=

Review URL: http://codereview.chromium.org/9701003

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

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