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_GET_KEYS_OPERATION_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_GET_KEYS_OPERATION_H_
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h"
12 #include "chromeos/cryptohome/homedir_methods.h"
13 #include "chromeos/login/auth/user_context.h"
14 #include "third_party/cros_system_api/dbus/service_constants.h"
18 class EasyUnlockGetKeysOperation
{
20 typedef base::Callback
<void(bool success
,
21 const EasyUnlockDeviceKeyDataList
& data_list
)>
23 EasyUnlockGetKeysOperation(const UserContext
& user_context
,
24 const GetKeysCallback
& callback
);
25 ~EasyUnlockGetKeysOperation();
33 cryptohome::MountError return_code
,
34 const std::vector
<cryptohome::KeyDefinition
>& key_definitions
);
36 UserContext user_context_
;
37 GetKeysCallback callback_
;
40 EasyUnlockDeviceKeyDataList devices_
;
42 base::WeakPtrFactory
<EasyUnlockGetKeysOperation
> weak_ptr_factory_
;
44 DISALLOW_COPY_AND_ASSIGN(EasyUnlockGetKeysOperation
);
47 } // namespace chromeos
49 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_GET_KEYS_OPERATION_H_