| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_IMPL_H_ | 5 #ifndef CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_IMPL_H_ |
| 6 #define CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_IMPL_H_ | 6 #define CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "chromeos/chromeos_export.h" | 14 #include "chromeos/chromeos_export.h" |
| 15 #include "chromeos/login/auth/extended_authenticator.h" | 15 #include "chromeos/login/auth/extended_authenticator.h" |
| 16 #include "third_party/cros_system_api/dbus/service_constants.h" | 16 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 17 | 17 |
| 18 namespace user_manager { |
| 19 class UserID; |
| 20 } |
| 21 |
| 18 namespace chromeos { | 22 namespace chromeos { |
| 19 | 23 |
| 20 class AuthStatusConsumer; | 24 class AuthStatusConsumer; |
| 21 class UserContext; | 25 class UserContext; |
| 22 | 26 |
| 23 // Implements ExtendedAuthenticator. | 27 // Implements ExtendedAuthenticator. |
| 24 class CHROMEOS_EXPORT ExtendedAuthenticatorImpl : public ExtendedAuthenticator { | 28 class CHROMEOS_EXPORT ExtendedAuthenticatorImpl : public ExtendedAuthenticator { |
| 25 public: | 29 public: |
| 26 explicit ExtendedAuthenticatorImpl(NewAuthStatusConsumer* consumer); | 30 explicit ExtendedAuthenticatorImpl(NewAuthStatusConsumer* consumer); |
| 27 explicit ExtendedAuthenticatorImpl(AuthStatusConsumer* consumer); | 31 explicit ExtendedAuthenticatorImpl(AuthStatusConsumer* consumer); |
| 28 | 32 |
| 29 // ExtendedAuthenticator: | 33 // ExtendedAuthenticator: |
| 30 void SetConsumer(AuthStatusConsumer* consumer) override; | 34 void SetConsumer(AuthStatusConsumer* consumer) override; |
| 31 void AuthenticateToMount(const UserContext& context, | 35 void AuthenticateToMount(const UserContext& context, |
| 32 const ResultCallback& success_callback) override; | 36 const ResultCallback& success_callback) override; |
| 33 void AuthenticateToCheck(const UserContext& context, | 37 void AuthenticateToCheck(const UserContext& context, |
| 34 const base::Closure& success_callback) override; | 38 const base::Closure& success_callback) override; |
| 35 void CreateMount(const std::string& user_id, | 39 void CreateMount(const user_manager::UserID& user_id, |
| 36 const std::vector<cryptohome::KeyDefinition>& keys, | 40 const std::vector<cryptohome::KeyDefinition>& keys, |
| 37 const ResultCallback& success_callback) override; | 41 const ResultCallback& success_callback) override; |
| 38 void AddKey(const UserContext& context, | 42 void AddKey(const UserContext& context, |
| 39 const cryptohome::KeyDefinition& key, | 43 const cryptohome::KeyDefinition& key, |
| 40 bool replace_existing, | 44 bool replace_existing, |
| 41 const base::Closure& success_callback) override; | 45 const base::Closure& success_callback) override; |
| 42 void UpdateKeyAuthorized(const UserContext& context, | 46 void UpdateKeyAuthorized(const UserContext& context, |
| 43 const cryptohome::KeyDefinition& key, | 47 const cryptohome::KeyDefinition& key, |
| 44 const std::string& signature, | 48 const std::string& signature, |
| 45 const base::Closure& success_callback) override; | 49 const base::Closure& success_callback) override; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 95 |
| 92 NewAuthStatusConsumer* consumer_; | 96 NewAuthStatusConsumer* consumer_; |
| 93 AuthStatusConsumer* old_consumer_; | 97 AuthStatusConsumer* old_consumer_; |
| 94 | 98 |
| 95 DISALLOW_COPY_AND_ASSIGN(ExtendedAuthenticatorImpl); | 99 DISALLOW_COPY_AND_ASSIGN(ExtendedAuthenticatorImpl); |
| 96 }; | 100 }; |
| 97 | 101 |
| 98 } // namespace chromeos | 102 } // namespace chromeos |
| 99 | 103 |
| 100 #endif // CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_IMPL_H_ | 104 #endif // CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_IMPL_H_ |
| OLD | NEW |