Handling empty ScopedDirLookup username in HandleDirectoryManagerEvent().
Handling empty ScopedDirLookup username in HandleDirectoryManagerEvent().

The constructor of syncable::ScopedDirLookup takes the username of the
account being synced. There are times when the username is blank,
resulting in a DCHECK being fired for the value of good() within the method
SyncManager::SyncInternal::InitialSyncEndedForAllEnabledTypes().

This patch makes sure that a ScopedDirLookup with a blank username is
never created by adding a check in the method
SyncManager::SyncInternal::HandleDirectoryManagerEvent().

BUG=51820
TEST=sync_integration_tests

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

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

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