Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Side by Side Diff: chrome/browser/sync/signin_manager.h

Issue 8515030: Do not clear tokens from db when the user enters new credentials. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/signin_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // The signin manager encapsulates some functionality tracking 5 // The signin manager encapsulates some functionality tracking
6 // which user is signed in. When a user is signed in, a ClientLogin 6 // which user is signed in. When a user is signed in, a ClientLogin
7 // request is run on their behalf. Auth tokens are fetched from Google 7 // request is run on their behalf. Auth tokens are fetched from Google
8 // and the results are stored in the TokenService. 8 // and the results are stored in the TokenService.
9 9
10 #ifndef CHROME_BROWSER_SYNC_SIGNIN_MANAGER_H_ 10 #ifndef CHROME_BROWSER_SYNC_SIGNIN_MANAGER_H_
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 const std::string& login_captcha); 74 const std::string& login_captcha);
75 75
76 // Used when a second factor access code was required to complete a signin 76 // Used when a second factor access code was required to complete a signin
77 // attempt. 77 // attempt.
78 void ProvideSecondFactorAccessCode(const std::string& access_code); 78 void ProvideSecondFactorAccessCode(const std::string& access_code);
79 79
80 // Sign a user out, removing the preference, erasing all keys 80 // Sign a user out, removing the preference, erasing all keys
81 // associated with the user, and canceling all auth in progress. 81 // associated with the user, and canceling all auth in progress.
82 void SignOut(); 82 void SignOut();
83 83
84 // Called when a new request to re-authenticate a user is in progress.
85 // Will clear in memory data but leaves the db as such so when the browser
86 // restarts we can use the old token(which might throw a password error).
87 void ClearInMemoryData();
88
84 // GaiaAuthConsumer 89 // GaiaAuthConsumer
85 virtual void OnClientLoginSuccess(const ClientLoginResult& result) OVERRIDE; 90 virtual void OnClientLoginSuccess(const ClientLoginResult& result) OVERRIDE;
86 virtual void OnClientLoginFailure(const GoogleServiceAuthError& error) 91 virtual void OnClientLoginFailure(const GoogleServiceAuthError& error)
87 OVERRIDE; 92 OVERRIDE;
88 virtual void OnGetUserInfoSuccess(const std::string& key, 93 virtual void OnGetUserInfoSuccess(const std::string& key,
89 const std::string& value) OVERRIDE; 94 const std::string& value) OVERRIDE;
90 virtual void OnGetUserInfoKeyNotFound(const std::string& key) OVERRIDE; 95 virtual void OnGetUserInfoKeyNotFound(const std::string& key) OVERRIDE;
91 virtual void OnGetUserInfoFailure(const GoogleServiceAuthError& error) 96 virtual void OnGetUserInfoFailure(const GoogleServiceAuthError& error)
92 OVERRIDE; 97 OVERRIDE;
93 virtual void OnTokenAuthFailure(const GoogleServiceAuthError& error) 98 virtual void OnTokenAuthFailure(const GoogleServiceAuthError& error)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // Actual OAuth login handler. 144 // Actual OAuth login handler.
140 scoped_ptr<GaiaOAuthFetcher> oauth_login_; 145 scoped_ptr<GaiaOAuthFetcher> oauth_login_;
141 146
142 // Register for notifications from the TokenService. 147 // Register for notifications from the TokenService.
143 content::NotificationRegistrar registrar_; 148 content::NotificationRegistrar registrar_;
144 149
145 DISALLOW_COPY_AND_ASSIGN(SigninManager); 150 DISALLOW_COPY_AND_ASSIGN(SigninManager);
146 }; 151 };
147 152
148 #endif // CHROME_BROWSER_SYNC_SIGNIN_MANAGER_H_ 153 #endif // CHROME_BROWSER_SYNC_SIGNIN_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698