Save memory prefs to disks more often
Save memory prefs to disks more often

The goal is to reduce the window where it is possible that a crash of Chrome
will cause double counting of prior crashes.
This change records all the (hopefully consistent) memory-resident state of the
metrics service to disk as soon as we get an ack from UMA that a
log was received.
Without this, there is a possible gap between when the stats are copied
to a log, and sent, vs. when the (now) zeroed crash count is written to disk.


bug=1314946

r=evanm,petersont

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

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