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

Side by Side Diff: chrome/browser/chromeos/login/easy_unlock/easy_unlock_remove_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: support multiple get key op, create key first then trim extra, lazily create manager 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_REMOVE_KEYS_OPERAT ION_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REMOVE_KEYS_OPERAT ION_H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h"
11 #include "chromeos/login/auth/user_context.h"
12 #include "third_party/cros_system_api/dbus/service_constants.h"
13
14 namespace chromeos {
15
16 class UserContext;
17
18 // A class to remove existing Easy unlock cryptohome keys starting at given
19 // index.
20 class EasyUnlockRemoveKeysOperation {
21 public:
22 typedef base::Callback<void (bool success)> RemoveKeysCallback;
23 EasyUnlockRemoveKeysOperation(
24 const UserContext& user_context,
25 size_t start_index,
26 const RemoveKeysCallback& callback);
27 ~EasyUnlockRemoveKeysOperation();
28
29 void Start();
30
31 private:
32 void RemoveKey();
33 void OnKeyRemoved(bool success, cryptohome::MountError return_code);
34
35 UserContext user_context_;
36 RemoveKeysCallback callback_;
37 size_t key_index_;
38 base::WeakPtrFactory<EasyUnlockRemoveKeysOperation> weak_ptr_factory_;
39
40 DISALLOW_COPY_AND_ASSIGN(EasyUnlockRemoveKeysOperation);
41 };
42
43 } // namespace chromeos
44
45 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REMOVE_KEYS_OPE RATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698