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

Unified Diff: components/user_manager/user_manager.h

Issue 1114543002: UMA to track the reason for re-auth (draft). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fixes. Created 5 years, 8 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 | « chrome/chrome_browser_chromeos.gypi ('k') | components/user_manager/user_manager_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_manager/user_manager.h
diff --git a/components/user_manager/user_manager.h b/components/user_manager/user_manager.h
index 9038c94a88b02b7b5e49c6306f192c4caead469c..5d9268ea1f1c6cf56c8e7218a600010cb75b98b9 100644
--- a/components/user_manager/user_manager.h
+++ b/components/user_manager/user_manager.h
@@ -348,6 +348,17 @@ class USER_MANAGER_EXPORT UserManager {
const std::string& path,
const bool in_value) = 0;
+ // Returns true if |user_id| preference by |path| does exist,
+ // fills in |out_value|. Otherwise returns false.
+ virtual bool GetKnownUserIntegerPref(const UserID& user_id,
+ const std::string& path,
+ int* out_value) = 0;
+
+ // Updates user's identified by |user_id| integer preference |path|.
+ virtual void SetKnownUserIntegerPref(const UserID& user_id,
+ const std::string& path,
+ const int in_value) = 0;
+
// Updates |gaia_id| for user with |user_id|.
// TODO(antrim): Update this once UserID contains GAIA ID.
virtual void UpdateGaiaID(const UserID& user_id,
@@ -372,6 +383,15 @@ class USER_MANAGER_EXPORT UserManager {
const std::string& device_id) = 0;
virtual std::string GetKnownUserDeviceId(const UserID& user_id) = 0;
+ // Saves why the user has to go through re-auth flow.
+ virtual void UpdateReauthReason(const UserID& user_id,
+ const int reauth_reason) = 0;
+
+ // Returns the reason why the user with |user_id| has to go through the
+ // re-auth flow. Returns true if such a reason was recorded or false
+ // otherwise.
+ virtual bool FindReauthReason(const UserID& user_id, int* out_value) = 0;
+
protected:
// Sets UserManager instance.
static void SetInstance(UserManager* user_manager);
« no previous file with comments | « chrome/chrome_browser_chromeos.gypi ('k') | components/user_manager/user_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698