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

Side by Side Diff: chrome/browser/profiles/profile_attributes_storage.h

Issue 1214483002: Improve the ProfileInfoCache API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 5 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_
7
8 class ProfileAttributesEntry;
9
10 class ProfileAttributesStorage {
11 public:
12 ProfileAttributesStorage() {}
13 ~ProfileAttributesStorage() {}
14
15 // If the |supervised_user_id| is non-empty, the profile will be marked to be
16 // omitted from the avatar-menu list on desktop versions. This is used while a
17 // supervised user is in the process of being registered with the server. Use
18 // ProfileAttributesEntry::SetIsOmitted() to clear the flag when the profile
19 // is ready to be shown in the menu.
20 virtual void AddProfile(const base::FilePath& profile_path,
21 const base::string16& name,
22 const std::string& gaia_id,
23 const base::string16& user_name,
24 size_t icon_index,
25 const std::string& supervised_user_id) = 0;
26 // Removes the profile at |profile_path| from this storage. Does not delete or
27 // affect the actual profile's data.
28 virtual void RemoveProfile(const base::FilePath& profile_path) = 0;
29
30 // Returns a vector containing one attributes entry per known profile. They
31 // are not sorted in any particular order.
32 virtual std::vector<ProfileAttributesEntry*> GetAllProfilesAttributes() = 0;
33
34 // Populates |entry| with the data for the profile at |path| and returns true
35 // if the operation is successful and |entry| can be used. Returns false
36 // otherwise.
37 // |entry| should not be cached as it may not reflect subsequent changes to
38 // the profile's metadata.
39 virtual bool GetProfileAttributesWithPath(
40 const base::FilePath& path, ProfileAttributesEntry** entry) = 0;
41
42 // Returns the count of known profiles.
43 virtual size_t GetNumberOfProfiles() const = 0;
44
45 DISALLOW_COPY_AND_ASSIGN(ProfileAttributesStorage);
46 };
47
48 #endif // CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_attributes_entry.cc ('k') | chrome/browser/profiles/profile_attributes_storage_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698