Chromium Code Reviews| Index: chrome/browser/signin/signin_manager.h |
| diff --git a/chrome/browser/signin/signin_manager.h b/chrome/browser/signin/signin_manager.h |
| index 5b82947f7914148710dad1dd4d1da3f1ed9fd9c9..e416684b0bb589ab5e9507e28aa2169d435d3a0a 100644 |
| --- a/chrome/browser/signin/signin_manager.h |
| +++ b/chrome/browser/signin/signin_manager.h |
| @@ -23,9 +23,13 @@ |
| #include "base/compiler_specific.h" |
| #include "base/gtest_prod_util.h" |
| #include "base/logging.h" |
| +#include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "chrome/browser/prefs/pref_change_registrar.h" |
| #include "chrome/browser/profiles/profile_keyed_service.h" |
| +#if defined(OS_WIN) |
| +#include "chrome/browser/sync/credential_cache_win.h" |
| +#endif |
| #include "chrome/common/net/gaia/gaia_auth_consumer.h" |
| #include "chrome/common/net/gaia/google_service_auth_error.h" |
| #include "content/public/browser/notification_observer.h" |
| @@ -105,6 +109,13 @@ class SigninManager : public GaiaAuthConsumer, |
| virtual void StartSignInWithOAuth(const std::string& username, |
| const std::string& password); |
| +#if defined(OS_WIN) |
| + // Attempt to sign in using credentials cached by the alternate profile |
| + // on Windows 8. |
| + virtual void StartSignInWithCachedCredentials( |
| + scoped_refptr<csync::CredentialCache> credentials); |
| +#endif |
|
Roger Tawa OOO till Jul 10th
2012/06/27 21:23:28
generally speaking there should be no #ifdef for p
Raghu Simha
2012/07/19 06:57:07
Done.
|
| + |
| // Provide a challenge solution to a failed signin attempt with |
| // StartSignInWithOAuth(). |type| and |token| come from the |
| // GoogleServiceAuthError of the failed attempt. |
| @@ -174,6 +185,23 @@ class SigninManager : public GaiaAuthConsumer, |
| void HandleAuthError(const GoogleServiceAuthError& error, |
| bool clear_transient_data); |
| + // Unsubscribes from notifications from the token service. |
| + void CleanupNotificationRegistration(); |
| + |
| + // Sends out the NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL notification and starts |
| + // fetching tokens. Called by OnGetUserInfoSuccess when the user manually |
| + // signs in to sync, and by StartSignInWithCachedCredentials when sync is |
| + // auto started on Windows 8 using cached credentials. |
| + void ConsumeUserInfoAndFinishSignin(); |
| + |
| +#if defined(OS_WIN) |
| + // Persists the authenticated username and auth tokens (sid and lsid) to the |
| + // sync credential cache when the user successfully signs in to sync on Win 8. |
| + // These credentials may be used later by the alternate Metro / Desktop |
| + // profile to automatically start up sync. |
|
Andrew T Wilson (Slow)
2012/06/26 23:26:13
What happens if both are already running? Is there
Raghu Simha
2012/06/27 00:17:04
I don't believe there is a mechanism within Chrome
|
| + void PersistAuthTokensAsync(); |
| +#endif |
| + |
| Profile* profile_; |
| // ClientLogin identity. |
| @@ -181,8 +209,6 @@ class SigninManager : public GaiaAuthConsumer, |
| std::string password_; // This is kept empty whenever possible. |
| bool had_two_factor_error_; |
| - void CleanupNotificationRegistration(); |
| - |
| // Result of the last client login, kept pending the lookup of the |
| // canonical email. |
| ClientLoginResult last_result_; |