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

Side by Side Diff: chromeos/login/auth/extended_authenticator_impl.h

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit tests. 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 unified diff | Download patch
OLDNEW
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/callback.h" 10 #include "base/callback.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/macros.h" 12 #include "base/macros.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 class AccountId;
19
18 namespace chromeos { 20 namespace chromeos {
19 21
20 class AuthStatusConsumer; 22 class AuthStatusConsumer;
21 class UserContext; 23 class UserContext;
22 24
23 // Implements ExtendedAuthenticator. 25 // Implements ExtendedAuthenticator.
24 class CHROMEOS_EXPORT ExtendedAuthenticatorImpl : public ExtendedAuthenticator { 26 class CHROMEOS_EXPORT ExtendedAuthenticatorImpl : public ExtendedAuthenticator {
25 public: 27 public:
26 explicit ExtendedAuthenticatorImpl(NewAuthStatusConsumer* consumer); 28 explicit ExtendedAuthenticatorImpl(NewAuthStatusConsumer* consumer);
27 explicit ExtendedAuthenticatorImpl(AuthStatusConsumer* consumer); 29 explicit ExtendedAuthenticatorImpl(AuthStatusConsumer* consumer);
28 30
29 // ExtendedAuthenticator: 31 // ExtendedAuthenticator:
30 void SetConsumer(AuthStatusConsumer* consumer) override; 32 void SetConsumer(AuthStatusConsumer* consumer) override;
31 void AuthenticateToMount(const UserContext& context, 33 void AuthenticateToMount(const UserContext& context,
32 const ResultCallback& success_callback) override; 34 const ResultCallback& success_callback) override;
33 void AuthenticateToCheck(const UserContext& context, 35 void AuthenticateToCheck(const UserContext& context,
34 const base::Closure& success_callback) override; 36 const base::Closure& success_callback) override;
35 void CreateMount(const std::string& user_id, 37 void CreateMount(const AccountId& account_id,
36 const std::vector<cryptohome::KeyDefinition>& keys, 38 const std::vector<cryptohome::KeyDefinition>& keys,
37 const ResultCallback& success_callback) override; 39 const ResultCallback& success_callback) override;
38 void AddKey(const UserContext& context, 40 void AddKey(const UserContext& context,
39 const cryptohome::KeyDefinition& key, 41 const cryptohome::KeyDefinition& key,
40 bool replace_existing, 42 bool replace_existing,
41 const base::Closure& success_callback) override; 43 const base::Closure& success_callback) override;
42 void UpdateKeyAuthorized(const UserContext& context, 44 void UpdateKeyAuthorized(const UserContext& context,
43 const cryptohome::KeyDefinition& key, 45 const cryptohome::KeyDefinition& key,
44 const std::string& signature, 46 const std::string& signature,
45 const base::Closure& success_callback) override; 47 const base::Closure& success_callback) override;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 93
92 NewAuthStatusConsumer* consumer_; 94 NewAuthStatusConsumer* consumer_;
93 AuthStatusConsumer* old_consumer_; 95 AuthStatusConsumer* old_consumer_;
94 96
95 DISALLOW_COPY_AND_ASSIGN(ExtendedAuthenticatorImpl); 97 DISALLOW_COPY_AND_ASSIGN(ExtendedAuthenticatorImpl);
96 }; 98 };
97 99
98 } // namespace chromeos 100 } // namespace chromeos
99 101
100 #endif // CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_IMPL_H_ 102 #endif // CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_IMPL_H_
OLDNEW
« no previous file with comments | « chromeos/login/auth/extended_authenticator.h ('k') | chromeos/login/auth/extended_authenticator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698