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

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: for comments in #2 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 all existing Easy unlock cryptohome keys.
19 class EasyUnlockRemoveKeysOperation {
20 public:
21 typedef base::Callback<void (bool success)> RemoveKeysCallback;
22 EasyUnlockRemoveKeysOperation(
23 const UserContext& user_context,
24 const RemoveKeysCallback& callback);
25 ~EasyUnlockRemoveKeysOperation();
26
27 void Start();
28
29 private:
30 void RemoveKey();
31 void OnKeyRemoved(bool success, cryptohome::MountError return_code);
32
33 UserContext user_context_;
34 RemoveKeysCallback callback_;
35 size_t key_index_;
36 base::WeakPtrFactory<EasyUnlockRemoveKeysOperation> weak_ptr_factory_;
37
38 DISALLOW_COPY_AND_ASSIGN(EasyUnlockRemoveKeysOperation);
39 };
40
41 } // namespace chromeos
42
43 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REMOVE_KEYS_OPE RATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698