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

Side by Side Diff: chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.h

Issue 558273002: [NOT FOR REVIEW] easy-signin: Simple click to sign-in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@easy-signin-data
Patch Set: rebase Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 10 matching lines...) Expand all
21 public: 21 public:
22 typedef base::Callback<void (bool success)> CreateKeysCallback; 22 typedef base::Callback<void (bool success)> CreateKeysCallback;
23 EasyUnlockCreateKeysOperation( 23 EasyUnlockCreateKeysOperation(
24 const UserContext& user_context, 24 const UserContext& user_context,
25 const EasyUnlockDeviceKeyDataList& devices, 25 const EasyUnlockDeviceKeyDataList& devices,
26 const CreateKeysCallback& callback); 26 const CreateKeysCallback& callback);
27 ~EasyUnlockCreateKeysOperation(); 27 ~EasyUnlockCreateKeysOperation();
28 28
29 void Start(); 29 void Start();
30 30
31 const UserContext& user_context() const { return user_context_; }
32
31 private: 33 private:
32 class ChallengeCreator; 34 class ChallengeCreator;
33 35
34 void CreateKeyForDeviceAtIndex(size_t index); 36 void CreateKeyForDeviceAtIndex(size_t index);
35 void OnChallengeCreated(size_t index, bool success); 37 void OnChallengeCreated(size_t index, bool success);
36 void OnGetSystemSalt(size_t index, 38 void OnGetSystemSalt(size_t index,
37 const std::string& system_salt); 39 const std::string& system_salt);
38 void OnKeyCreated(size_t index, 40 void OnKeyCreated(size_t index,
41 const Key& user_key,
39 bool success, 42 bool success,
40 cryptohome::MountError return_code); 43 cryptohome::MountError return_code);
41 44
42 UserContext user_context_; 45 UserContext user_context_;
43 EasyUnlockDeviceKeyDataList devices_; 46 EasyUnlockDeviceKeyDataList devices_;
44 CreateKeysCallback callback_; 47 CreateKeysCallback callback_;
45 48
46 // Index of the key to be created. 49 // Index of the key to be created.
47 size_t key_creation_index_; 50 size_t key_creation_index_;
48 51
49 scoped_ptr<ChallengeCreator> challenge_creator_; 52 scoped_ptr<ChallengeCreator> challenge_creator_;
50 53
51 base::WeakPtrFactory<EasyUnlockCreateKeysOperation> weak_ptr_factory_; 54 base::WeakPtrFactory<EasyUnlockCreateKeysOperation> weak_ptr_factory_;
52 55
53 DISALLOW_COPY_AND_ASSIGN(EasyUnlockCreateKeysOperation); 56 DISALLOW_COPY_AND_ASSIGN(EasyUnlockCreateKeysOperation);
54 }; 57 };
55 58
56 } // namespace chromeos 59 } // namespace chromeos
57 60
58 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_CREATE_KEYS_OPE RATION_H_ 61 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_CREATE_KEYS_OPE RATION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698