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(const UserContext
& user_context
,
25 const RemoveKeysCallback
& callback
);
26 ~EasyUnlockRemoveKeysOperation();
31 void OnGetSystemSalt(const std::string
& system_salt
);
34 void OnKeyRemoved(bool success
, cryptohome::MountError return_code
);
36 UserContext user_context_
;
37 RemoveKeysCallback callback_
;
39 base::WeakPtrFactory
<EasyUnlockRemoveKeysOperation
> weak_ptr_factory_
;
41 DISALLOW_COPY_AND_ASSIGN(EasyUnlockRemoveKeysOperation
);
44 } // namespace chromeos
46 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REMOVE_KEYS_OPERATION_H_