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 CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_CREATE_KEYS_OPERAT
ION_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_CREATE_KEYS_OPERAT
ION_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_CREATE_KEYS_OPERAT
ION_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_CREATE_KEYS_OPERAT
ION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 typedef base::Callback<void (bool success)> CreateKeysCallback; | 24 typedef base::Callback<void (bool success)> CreateKeysCallback; |
25 EasyUnlockCreateKeysOperation( | 25 EasyUnlockCreateKeysOperation( |
26 const UserContext& user_context, | 26 const UserContext& user_context, |
27 const std::string& tpm_public_key, | 27 const std::string& tpm_public_key, |
28 const EasyUnlockDeviceKeyDataList& devices, | 28 const EasyUnlockDeviceKeyDataList& devices, |
29 const CreateKeysCallback& callback); | 29 const CreateKeysCallback& callback); |
30 ~EasyUnlockCreateKeysOperation(); | 30 ~EasyUnlockCreateKeysOperation(); |
31 | 31 |
32 void Start(); | 32 void Start(); |
33 | 33 |
34 // The UserContext returned will contain the new key if called after the | |
35 // operation has completed successfully. | |
36 const UserContext& user_context() const { return user_context_; } | 34 const UserContext& user_context() const { return user_context_; } |
37 | 35 |
38 private: | 36 private: |
39 class ChallengeCreator; | 37 class ChallengeCreator; |
40 | 38 |
41 void CreateKeyForDeviceAtIndex(size_t index); | 39 void CreateKeyForDeviceAtIndex(size_t index); |
42 void OnChallengeCreated(size_t index, bool success); | 40 void OnChallengeCreated(size_t index, bool success); |
43 void OnGetSystemSalt(size_t index, | 41 void OnGetSystemSalt(size_t index, |
44 const std::string& system_salt); | 42 const std::string& system_salt); |
45 void OnKeyCreated(size_t index, | 43 void OnKeyCreated(size_t index, |
(...skipping 12 matching lines...) Expand all Loading... |
58 scoped_ptr<ChallengeCreator> challenge_creator_; | 56 scoped_ptr<ChallengeCreator> challenge_creator_; |
59 | 57 |
60 base::WeakPtrFactory<EasyUnlockCreateKeysOperation> weak_ptr_factory_; | 58 base::WeakPtrFactory<EasyUnlockCreateKeysOperation> weak_ptr_factory_; |
61 | 59 |
62 DISALLOW_COPY_AND_ASSIGN(EasyUnlockCreateKeysOperation); | 60 DISALLOW_COPY_AND_ASSIGN(EasyUnlockCreateKeysOperation); |
63 }; | 61 }; |
64 | 62 |
65 } // namespace chromeos | 63 } // namespace chromeos |
66 | 64 |
67 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_CREATE_KEYS_OPE
RATION_H_ | 65 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_CREATE_KEYS_OPE
RATION_H_ |
OLD | NEW |