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

Unified Diff: chrome/browser/chromeos/login/supervised_user_manager.h

Issue 132803012: Attempt to recover sync token for managed user once we detected that sync auth fails. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix usage of metrics Created 6 years, 10 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
Index: chrome/browser/chromeos/login/supervised_user_manager.h
diff --git a/chrome/browser/chromeos/login/supervised_user_manager.h b/chrome/browser/chromeos/login/supervised_user_manager.h
index b0ad266e1a671f6316e1c29ad33bd60afd403650..06b5e702c82c1f8e17590c2577bee66af3257666 100644
--- a/chrome/browser/chromeos/login/supervised_user_manager.h
+++ b/chrome/browser/chromeos/login/supervised_user_manager.h
@@ -8,8 +8,10 @@
#include <string>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/strings/string16.h"
#include "base/values.h"
+#include "chrome/browser/profiles/profile.h"
class PrefRegistrySimple;
@@ -30,6 +32,9 @@ extern const int kMinPasswordRevision;
// lookup methods that make sense only for supervised users.
class SupervisedUserManager {
public:
+ typedef base::Callback<void(const std::string& /* token */)>
+ LoadTokenCallback;
+
// Registers user manager preferences.
static void RegisterPrefs(PrefRegistrySimple* registry);
@@ -104,6 +109,14 @@ class SupervisedUserManager {
const std::string& user_id,
const base::DictionaryValue* password_info) = 0;
+ // Loads a sync oauth token in background, and passes it to callback.
+ virtual void LoadSupervisedUserToken(Profile* profile,
+ const LoadTokenCallback& callback) = 0;
+
+ // Configures sync service with oauth token.
+ virtual void ConfigureSyncWithToken(Profile* profile,
+ const std::string& token) = 0;
+
private:
DISALLOW_COPY_AND_ASSIGN(SupervisedUserManager);
};

Powered by Google App Engine
This is Rietveld 408576698