[sync] Force gaia re-auth on CrOs during sign in after changing password
[sync] Force gaia re-auth on CrOs during sign in after changing password

On Chrome OS, when we detect that a user's gaia password has changed, we
prompt the user to sign out and sign in again via a link on the settings
page.

The first time the user signs out and back in, we do a local account
re-auth instead of a full-fledged gaia re-auth. As a result, we continue
to use an old OAuth2 token, and this requires the user to sign out and
sign in yet again before the token is refreshed.

This patch adds code that invalidates the existing OAuth2 token during
the first sign out, so that the user is forced to do a full-fledged
gaia-reauth during the first subsequent sign in, and thereby gets a
fresh OAuth2 token.

TBR=xiyuan@chromium.org, zelidrag@chromium.org
BUG=234164
TEST=Sign in, change gaia password, click "Sign out and sign in", and make sure you go through a gaia re-auth the first time

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

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

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