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.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REMOVE_KEYS_OPERATION_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REMOVE_KEYS_OPERATION_H_
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"
18 // A class to remove existing Easy unlock cryptohome keys starting at given
20 class EasyUnlockRemoveKeysOperation {
22 typedef base::Callback<void (bool success)> RemoveKeysCallback;
23 EasyUnlockRemoveKeysOperation(
24 const UserContext& user_context,
26 const RemoveKeysCallback& callback);
27 ~EasyUnlockRemoveKeysOperation();
32 void OnGetSystemSalt(const std::string& system_salt);
35 void OnKeyRemoved(bool success, cryptohome::MountError return_code);
37 UserContext user_context_;
38 RemoveKeysCallback callback_;
40 base::WeakPtrFactory<EasyUnlockRemoveKeysOperation> weak_ptr_factory_;
42 DISALLOW_COPY_AND_ASSIGN(EasyUnlockRemoveKeysOperation);
45 } // namespace chromeos
47 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REMOVE_KEYS_OPERATION_H_