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

Unified Diff: chrome/browser/chromeos/login/session/user_session_manager.h

Issue 599263002: easy-signin: Defer chrome restart until key ops finish. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: only defer restart Created 6 years, 3 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/session/user_session_manager.h
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.h b/chrome/browser/chromeos/login/session/user_session_manager.h
index f05996c797e3bbd07bff8641f5c13388ca6e4965..2bef3a8ab85bbbfe39206fd1cb1eac6b08693e56 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.h
+++ b/chrome/browser/chromeos/login/session/user_session_manager.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/memory/weak_ptr.h"
@@ -139,12 +140,18 @@ class UserSessionManager
// Changes browser locale (selects best suitable locale from different
// user settings). Returns true if callback will be called.
- // Returns true if callback will be called.
bool RespectLocalePreference(
Profile* profile,
const user_manager::User* user,
scoped_ptr<locale_util::SwitchLanguageCallback> callback) const;
+ // Returns true if Easy unlock keys needs to be updated.
+ bool NeedsToUpdateEasyUnlockKeys() const;
+
+ // Returns true if there are pending Easy unlock key operations and
+ // |callback| will be invoked when it is done.
+ bool CheckEasyUnlockKeyOps(const base::Closure& callback);
+
void AddSessionStateObserver(chromeos::UserSessionStateObserver* observer);
void RemoveSessionStateObserver(chromeos::UserSessionStateObserver* observer);
@@ -244,6 +251,9 @@ class UserSessionManager
// Update Easy unlock cryptohome keys using the pairing data in user prefs.
void UpdateEasyUnlockKeys(Profile* user_profile);
+ // Callback invoked when Easy unlock key operations are finished.
+ void OnEasyUnlockKeyOpsFinished(bool success);
+
UserSessionManagerDelegate* delegate_;
// Authentication/user context.
@@ -292,6 +302,8 @@ class UserSessionManager
// Manages Easy unlock cryptohome keys.
scoped_ptr<EasyUnlockKeyManager> easy_unlock_key_manager_;
+ bool running_easy_unlock_key_ops_;
+ base::Closure easy_unlock_key_ops_finished_callback_;
DISALLOW_COPY_AND_ASSIGN(UserSessionManager);
};
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/chromeos/login/session/user_session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698