Basic framework for locally managed user creation flow:
Show screen, start transaction, display spinner, when everything is done show success message/splash screen, on "Finish" button end custodian session.

BUG=176277
[email protected]


Review URL: https://chromiumcodereview.appspot.com/12313092

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185330 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/chromeos/login/user_manager.h b/chrome/browser/chromeos/login/user_manager.h
index eeed9cb..969dee17 100644
--- a/chrome/browser/chromeos/login/user_manager.h
+++ b/chrome/browser/chromeos/login/user_manager.h
@@ -124,13 +124,17 @@
   // Fires NOTIFICATION_SESSION_STARTED.
   virtual void SessionStarted() = 0;
 
-  // Generates unique username for locally managed user, creates user with this
-  // display name, sets |display_name| for created user and stores it to
+  // Creates locally managed user with given display name, and id (e-mail), and
+  // sets |display_name| for created user and stores it to
   // persistent list. Returns created user, or existing user if there already
   // was locally managed user with such display name.
   virtual const User* CreateLocallyManagedUserRecord(
+      const std::string& e_mail,
       const string16& display_name) = 0;
 
+  // Generates unique username for locally managed user.
+  virtual std::string GenerateUniqueLocallyManagedUserId() = 0;
+
   // Removes the user from the device. Note, it will verify that the given user
   // isn't the owner, so calling this method for the owner will take no effect.
   // Note, |delegate| can be NULL.
@@ -242,6 +246,17 @@
   virtual bool IsUserNonCryptohomeDataEphemeral(
       const std::string& email) const = 0;
 
+  // Create a record about starting locally managed user creation transaction.
+  virtual void StartLocallyManagedUserCreationTransaction(
+      const string16& display_name) = 0;
+
+  // Add user id to locally managed user creation transaction record.
+  virtual void SetLocallyManagedUserCreationTransactionUserId(
+      const std::string& email) = 0;
+
+  // Remove locally managed user creation transaction record.
+  virtual void CommitLocallyManagedUserCreationTransaction() = 0;
+
   // Method that allows to set |flow| for user identified by |email|.
   // Flow should be set before login attempt.
   // Takes ownership of the |flow|, |flow| will be deleted in case of login