OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include <chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h> | 5 #include <chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h> |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/barrier_closure.h" | 10 #include "base/barrier_closure.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 PrefService* const local_state = g_browser_process->local_state(); | 40 PrefService* const local_state = g_browser_process->local_state(); |
41 ListPrefUpdate list_update(local_state, kArcKioskUsersToRemove); | 41 ListPrefUpdate list_update(local_state, kArcKioskUsersToRemove); |
42 | 42 |
43 list_update->AppendString(id.id()); | 43 list_update->AppendString(id.id()); |
44 local_state->CommitPendingWrite(); | 44 local_state->CommitPendingWrite(); |
45 } | 45 } |
46 | 46 |
47 void CancelDelayedCryptohomeRemoval(const cryptohome::Identification& id) { | 47 void CancelDelayedCryptohomeRemoval(const cryptohome::Identification& id) { |
48 PrefService* const local_state = g_browser_process->local_state(); | 48 PrefService* const local_state = g_browser_process->local_state(); |
49 ListPrefUpdate list_update(local_state, kArcKioskUsersToRemove); | 49 ListPrefUpdate list_update(local_state, kArcKioskUsersToRemove); |
50 list_update->Remove(base::StringValue(id.id()), nullptr); | 50 list_update->Remove(base::Value(id.id()), nullptr); |
51 local_state->CommitPendingWrite(); | 51 local_state->CommitPendingWrite(); |
52 } | 52 } |
53 | 53 |
54 void OnRemoveAppCryptohomeComplete(const cryptohome::Identification& id, | 54 void OnRemoveAppCryptohomeComplete(const cryptohome::Identification& id, |
55 const base::Closure& callback, | 55 const base::Closure& callback, |
56 bool success, | 56 bool success, |
57 cryptohome::MountError return_code) { | 57 cryptohome::MountError return_code) { |
58 if (success) { | 58 if (success) { |
59 CancelDelayedCryptohomeRemoval(id); | 59 CancelDelayedCryptohomeRemoval(id); |
60 } else { | 60 } else { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 cryptohome_id, base::Bind(&OnRemoveAppCryptohomeComplete, | 250 cryptohome_id, base::Bind(&OnRemoveAppCryptohomeComplete, |
251 cryptohome_id, base::Closure())); | 251 cryptohome_id, base::Closure())); |
252 } | 252 } |
253 } | 253 } |
254 | 254 |
255 if (active_user_to_be_deleted) | 255 if (active_user_to_be_deleted) |
256 chrome::AttemptUserExit(); | 256 chrome::AttemptUserExit(); |
257 } | 257 } |
258 | 258 |
259 } // namespace chromeos | 259 } // namespace chromeos |
OLD | NEW |