Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / login / login_performer.h
index 379a458..de6b448 100644 (file)
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/chromeos/login/authenticator.h"
 #include "chrome/browser/chromeos/login/login_status_consumer.h"
 #include "content/public/browser/notification_registrar.h"
 #include "google_apis/gaia/google_service_auth_error.h"
 
+namespace policy {
+class WildcardLoginChecker;
+}
+
 namespace chromeos {
 
 // This class encapsulates sign in operations.
@@ -77,7 +82,8 @@ class LoginPerformer : public LoginStatusConsumer,
   void LoginAsPublicAccount(const std::string& username);
 
   // Performs a login into the kiosk mode account with |app_user_id|.
-  void LoginAsKioskAccount(const std::string& app_user_id);
+  void LoginAsKioskAccount(const std::string& app_user_id,
+                           bool force_ephemeral);
 
   // Migrates cryptohome using |old_password| specified.
   void RecoverEncryptedData(const std::string& old_password);
@@ -117,6 +123,11 @@ class LoginPerformer : public LoginStatusConsumer,
   // Starts authentication.
   void StartAuthentication();
 
+  // Completion callback for the online wildcard login check for enterprise
+  // devices. Continues the login process or signals whitelist check failure
+  // depending on the value of |result|.
+  void OnlineWildcardLoginCheckCompleted(bool result);
+
   // Used for logging in.
   scoped_refptr<Authenticator> authenticator_;
 
@@ -141,6 +152,9 @@ class LoginPerformer : public LoginStatusConsumer,
   // Authorization mode type.
   AuthorizationMode auth_mode_;
 
+  // Used to verify logins that matched wildcard on the login whitelist.
+  scoped_ptr<policy::WildcardLoginChecker> wildcard_login_checker_;
+
   base::WeakPtrFactory<LoginPerformer> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(LoginPerformer);