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

Unified Diff: chrome/browser/ui/webui/signin/signin_create_profile_handler.h

Issue 1826903002: updated UI, default profile name, check for existing supervised user before create (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: chrome/browser/ui/webui/signin/signin_create_profile_handler.h
diff --git a/chrome/browser/ui/webui/signin/signin_create_profile_handler.h b/chrome/browser/ui/webui/signin/signin_create_profile_handler.h
index 05ebe6413c3369ccb133f0d208543a20192c0f30..a370e22cd690c885790a2fdb7becd9babfaff194 100644
--- a/chrome/browser/ui/webui/signin/signin_create_profile_handler.h
+++ b/chrome/browser/ui/webui/signin/signin_create_profile_handler.h
@@ -58,6 +58,10 @@ class SigninCreateProfileHandler : public content::WebUIMessageHandler {
// Sends the array of default profile icon URLs to WebUI.
void RequestDefaultProfileIcons(const base::ListValue* args);
+ // Sends an object to WebUI of the form: { "name": profileName } after
+ // "requestDefaultProfileIcons" is fulfilled.
+ void SendNewProfileDefaults();
+
// Callback for the "requestSignedInProfiles" message.
// Sends the email address of the signed-in user, or an empty string if the
// user is not signed in. Also sends information about whether supervised
@@ -179,6 +183,8 @@ class SigninCreateProfileHandler : public content::WebUIMessageHandler {
void RecordSupervisedProfileCreationMetrics(
GoogleServiceAuthError::State error_state);
+ // Creates the supervised user with the given |supervised_user_id| if the user
+ // doesn't already exist on the machine.
void DoCreateProfileIfPossible(const base::string16& name,
const std::string& icon_url,
bool create_shortcut,
@@ -190,6 +196,11 @@ class SigninCreateProfileHandler : public content::WebUIMessageHandler {
supervised_user_registration_utility_;
#endif
+ // Returns true if profile has signed into chrome.
+ bool IsAccountConnected(Profile* profile) const;
+ // Returns true if profile has authentication error.
+ bool HasAuthError(Profile* profile) const;
+
base::WeakPtrFactory<SigninCreateProfileHandler> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(SigninCreateProfileHandler);

Powered by Google App Engine
This is Rietveld 408576698