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

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

Issue 554043003: cros: Create cryptohome keys for Easy sign-in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix use-after-free 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_GET_KEYS_OPERATION _H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_GET_KEYS_OPERATION _H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "base/memory/scoped_vector.h"
11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h"
13 #include "chromeos/cryptohome/homedir_methods.h"
14 #include "chromeos/login/auth/user_context.h"
15 #include "third_party/cros_system_api/dbus/service_constants.h"
16
17 namespace chromeos {
18
19 class EasyUnlockGetKeysOperation {
20 public:
21 typedef base::Callback<void(bool success,
22 const EasyUnlockDeviceKeyDataList& data_list)>
23 GetKeysCallback;
24 EasyUnlockGetKeysOperation(const UserContext& user_context,
25 const GetKeysCallback& callback);
26 ~EasyUnlockGetKeysOperation();
27
28 void Start();
29
30 private:
31 void GetKeyData();
32 void OnGetKeyData(bool success,
33 cryptohome::MountError return_code,
34 ScopedVector<cryptohome::RetrievedKeyData> retrieved_data);
35
36 UserContext user_context_;
37 GetKeysCallback callback_;
38
39 int key_index_;
40 EasyUnlockDeviceKeyDataList devices_;
41
42 base::WeakPtrFactory<EasyUnlockGetKeysOperation> weak_ptr_factory_;
43
44 DISALLOW_COPY_AND_ASSIGN(EasyUnlockGetKeysOperation);
45 };
46
47 } // namespace chromeos
48
49 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_GET_KEYS_OPERAT ION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698