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

Unified Diff: components/user_manager/user_manager.h

Issue 1025663002: Implement oauth token external handler checking. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update fake user manager Created 5 years, 9 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: components/user_manager/user_manager.h
diff --git a/components/user_manager/user_manager.h b/components/user_manager/user_manager.h
index 1ac1a7f5f7b4f20258b8441c2a54b13afcae9673..3f628dbbeb8cb363d2ad56adb398c1928d559634 100644
--- a/components/user_manager/user_manager.h
+++ b/components/user_manager/user_manager.h
@@ -8,9 +8,14 @@
#include <string>
#include "components/user_manager/user.h"
+#include "components/user_manager/user_id.h"
#include "components/user_manager/user_manager_export.h"
#include "components/user_manager/user_type.h"
+namespace base {
+class DictionaryValue;
+}
+
namespace chromeos {
class ScopedUserManagerEnabler;
}
@@ -306,6 +311,21 @@ class USER_MANAGER_EXPORT UserManager {
// Returns true if supervised users allowed.
virtual bool AreSupervisedUsersAllowed() const = 0;
+ // Methods for storage/retrieval of per-user properties in Local State.
+
+ // Performs a lookup of properties associated with |user_id|. If found,
+ // returns |true| and fills |out_value|. |out_value| can be NULL, if
+ // only existence check is required.
+ virtual bool FindKnownUserPrefs(const UserID& user_id,
+ const base::DictionaryValue** out_value) = 0;
+
+ // Updates (or creates) properties associated with |user_id| based
+ // on |values|. |clear| defines if existing properties are cleared (|true|)
+ // or if it is just a incremental update (|false|).
+ virtual void UpdateKnownUserPrefs(const UserID& user_id,
+ const base::DictionaryValue& values,
+ bool clear) = 0;
+
protected:
// Sets UserManager instance.
static void SetInstance(UserManager* user_manager);

Powered by Google App Engine
This is Rietveld 408576698