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

Unified Diff: chrome/browser/signin/signin_manager.h

Issue 10656033: [sync] Automatic bootstrapping of Sync on Win 8 from cached credentials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 8 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/signin/signin_manager.cc » ('j') | chrome/browser/signin/signin_manager.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | chrome/browser/signin/signin_manager.cc » ('j') | chrome/browser/signin/signin_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698