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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 LOG(ERROR) << "Crypthomed is not available."; | 71 LOG(ERROR) << "Crypthomed is not available."; |
72 return; | 72 return; |
73 } | 73 } |
74 | 74 |
75 PrefService* const local_state = g_browser_process->local_state(); | 75 PrefService* const local_state = g_browser_process->local_state(); |
76 const base::ListValue* const list = | 76 const base::ListValue* const list = |
77 local_state->GetList(kArcKioskUsersToRemove); | 77 local_state->GetList(kArcKioskUsersToRemove); |
78 for (base::ListValue::const_iterator it = list->begin(); it != list->end(); | 78 for (base::ListValue::const_iterator it = list->begin(); it != list->end(); |
79 ++it) { | 79 ++it) { |
80 std::string entry; | 80 std::string entry; |
81 if (!(*it)->GetAsString(&entry)) { | 81 if (!it->GetAsString(&entry)) { |
82 LOG(ERROR) << "List of cryptohome ids is broken"; | 82 LOG(ERROR) << "List of cryptohome ids is broken"; |
83 continue; | 83 continue; |
84 } | 84 } |
85 const cryptohome::Identification cryptohome_id( | 85 const cryptohome::Identification cryptohome_id( |
86 cryptohome::Identification::FromString(entry)); | 86 cryptohome::Identification::FromString(entry)); |
87 cryptohome::AsyncMethodCaller::GetInstance()->AsyncRemove( | 87 cryptohome::AsyncMethodCaller::GetInstance()->AsyncRemove( |
88 cryptohome_id, base::Bind(&OnRemoveAppCryptohomeComplete, cryptohome_id, | 88 cryptohome_id, base::Bind(&OnRemoveAppCryptohomeComplete, cryptohome_id, |
89 base::Closure())); | 89 base::Closure())); |
90 } | 90 } |
91 } | 91 } |
(...skipping 158 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 |