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

Side by Side Diff: chrome/browser/chromeos/login/easy_unlock/easy_unlock_remove_keys_operation.h

Issue 789793005: Revert of Clean up Smart Lock cryptohome keys logic: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REMOVE_KEYS_OPERAT ION_H_ 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_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REMOVE_KEYS_OPERAT ION_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "chromeos/login/auth/user_context.h" 11 #include "chromeos/login/auth/user_context.h"
12 #include "third_party/cros_system_api/dbus/service_constants.h" 12 #include "third_party/cros_system_api/dbus/service_constants.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 class UserContext; 16 class UserContext;
17 17
18 // A class to remove existing Easy unlock cryptohome keys starting at given 18 // A class to remove existing Easy unlock cryptohome keys starting at given
19 // index. 19 // index.
20 class EasyUnlockRemoveKeysOperation { 20 class EasyUnlockRemoveKeysOperation {
21 public: 21 public:
22 typedef base::Callback<void (bool success)> RemoveKeysCallback; 22 typedef base::Callback<void (bool success)> RemoveKeysCallback;
23 EasyUnlockRemoveKeysOperation(const UserContext& user_context, 23 EasyUnlockRemoveKeysOperation(
24 size_t start_index, 24 const UserContext& user_context,
25 const RemoveKeysCallback& callback); 25 size_t start_index,
26 const RemoveKeysCallback& callback);
26 ~EasyUnlockRemoveKeysOperation(); 27 ~EasyUnlockRemoveKeysOperation();
27 28
28 void Start(); 29 void Start();
29 30
30 private: 31 private:
31 void OnGetSystemSalt(const std::string& system_salt); 32 void OnGetSystemSalt(const std::string& system_salt);
32 33
33 void RemoveKey(); 34 void RemoveKey();
34 void OnKeyRemoved(bool success, cryptohome::MountError return_code); 35 void OnKeyRemoved(bool success, cryptohome::MountError return_code);
35 36
36 UserContext user_context_; 37 UserContext user_context_;
37 RemoveKeysCallback callback_; 38 RemoveKeysCallback callback_;
38 size_t key_index_; 39 size_t key_index_;
39 base::WeakPtrFactory<EasyUnlockRemoveKeysOperation> weak_ptr_factory_; 40 base::WeakPtrFactory<EasyUnlockRemoveKeysOperation> weak_ptr_factory_;
40 41
41 DISALLOW_COPY_AND_ASSIGN(EasyUnlockRemoveKeysOperation); 42 DISALLOW_COPY_AND_ASSIGN(EasyUnlockRemoveKeysOperation);
42 }; 43 };
43 44
44 } // namespace chromeos 45 } // namespace chromeos
45 46
46 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REMOVE_KEYS_OPE RATION_H_ 47 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REMOVE_KEYS_OPE RATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698