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

Side by Side Diff: chrome/browser/chromeos/login/user_manager_impl.h

Issue 15198005: Remove data belonging to a public account when the account is removed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/user_manager_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_USER_MANAGER_IMPL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector>
10 11
11 #include "base/basictypes.h" 12 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/singleton.h" 14 #include "base/memory/singleton.h"
14 #include "base/observer_list.h" 15 #include "base/observer_list.h"
15 #include "base/synchronization/lock.h" 16 #include "base/synchronization/lock.h"
16 #include "base/values.h" 17 #include "base/values.h"
17 #include "chrome/browser/chromeos/login/user.h" 18 #include "chrome/browser/chromeos/login/user.h"
18 #include "chrome/browser/chromeos/login/user_image_manager_impl.h" 19 #include "chrome/browser/chromeos/login/user_image_manager_impl.h"
19 #include "chrome/browser/chromeos/login/user_manager.h" 20 #include "chrome/browser/chromeos/login/user_manager.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 210
210 // Removes data stored or cached outside the user's cryptohome (wallpaper, 211 // Removes data stored or cached outside the user's cryptohome (wallpaper,
211 // avatar, OAuth token status, display name, display email). 212 // avatar, OAuth token status, display name, display email).
212 void RemoveNonCryptohomeData(const std::string& email); 213 void RemoveNonCryptohomeData(const std::string& email);
213 214
214 // Removes a regular or locally managed user from the user list. 215 // Removes a regular or locally managed user from the user list.
215 // Returns the user if found or NULL otherwise. 216 // Returns the user if found or NULL otherwise.
216 // Also removes the user from the persistent user list. 217 // Also removes the user from the persistent user list.
217 User* RemoveRegularOrLocallyManagedUserFromList(const std::string& username); 218 User* RemoveRegularOrLocallyManagedUserFromList(const std::string& username);
218 219
220 // Removes data belonging to public accounts that are no longer found on the
221 // user list. If the user is currently logged into one of these accounts, the
222 // data for that account is not removed immediately but marked as pending
223 // removal after logout.
224 void CleanUpPublicAccountNonCryptohomeData(
225 const std::vector<std::string>& old_public_accounts);
226
219 // Replaces the list of public accounts with |public_accounts|. Ensures that 227 // Replaces the list of public accounts with |public_accounts|. Ensures that
220 // data belonging to accounts no longer on the list is removed. Returns |true| 228 // data belonging to accounts no longer on the list is removed. Returns |true|
221 // if the list has changed. 229 // if the list has changed.
222 // Public accounts are defined by policy. This method is called whenever an 230 // Public accounts are defined by policy. This method is called whenever an
223 // updated list of public accounts is received from policy. 231 // updated list of public accounts is received from policy.
224 bool UpdateAndCleanUpPublicAccounts(const base::ListValue& public_accounts); 232 bool UpdateAndCleanUpPublicAccounts(const base::ListValue& public_accounts);
225 233
226 // Updates the display name for public account |username| from policy settings 234 // Updates the display name for public account |username| from policy settings
227 // associated with that username. 235 // associated with that username.
228 void UpdatePublicAccountDisplayName(const std::string& username); 236 void UpdatePublicAccountDisplayName(const std::string& username);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 344
337 // Specific flows by user e-mail. 345 // Specific flows by user e-mail.
338 FlowMap specific_flows_; 346 FlowMap specific_flows_;
339 347
340 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); 348 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl);
341 }; 349 };
342 350
343 } // namespace chromeos 351 } // namespace chromeos
344 352
345 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 353 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/user_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698