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

Side by Side Diff: chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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 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
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 cryptohome_id, base::Bind(&OnRemoveAppCryptohomeComplete, 256 cryptohome_id, base::Bind(&OnRemoveAppCryptohomeComplete,
257 cryptohome_id, base::Closure())); 257 cryptohome_id, base::Closure()));
258 } 258 }
259 } 259 }
260 260
261 if (active_user_to_be_deleted) 261 if (active_user_to_be_deleted)
262 chrome::AttemptUserExit(); 262 chrome::AttemptUserExit();
263 } 263 }
264 264
265 } // namespace chromeos 265 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/chromeos/arc/policy/arc_policy_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698