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

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

Issue 1242793005: Refactor most c/b/profiles calls to ProfileInfoCache. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows unit test and ChromeOS build 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_
7 7
8 class ProfileAttributesEntry; 8 class ProfileAttributesEntry;
9 class ProfileInfoCacheObserver;
9 10
10 class ProfileAttributesStorage { 11 class ProfileAttributesStorage {
11 public: 12 public:
12 ProfileAttributesStorage() {} 13 ProfileAttributesStorage() {}
13 ~ProfileAttributesStorage() {} 14 ~ProfileAttributesStorage() {}
14 15
15 // If the |supervised_user_id| is non-empty, the profile will be marked to be 16 // 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 // 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 // supervised user is in the process of being registered with the server. Use
18 // ProfileAttributesEntry::SetIsOmitted() to clear the flag when the profile 19 // ProfileAttributesEntry::SetIsOmitted() to clear the flag when the profile
(...skipping 16 matching lines...) Expand all
35 // if the operation is successful and |entry| can be used. Returns false 36 // if the operation is successful and |entry| can be used. Returns false
36 // otherwise. 37 // otherwise.
37 // |entry| should not be cached as it may not reflect subsequent changes to 38 // |entry| should not be cached as it may not reflect subsequent changes to
38 // the profile's metadata. 39 // the profile's metadata.
39 virtual bool GetProfileAttributesWithPath( 40 virtual bool GetProfileAttributesWithPath(
40 const base::FilePath& path, ProfileAttributesEntry** entry) = 0; 41 const base::FilePath& path, ProfileAttributesEntry** entry) = 0;
41 42
42 // Returns the count of known profiles. 43 // Returns the count of known profiles.
43 virtual size_t GetNumberOfProfiles() const = 0; 44 virtual size_t GetNumberOfProfiles() const = 0;
44 45
46 // Returns unique name that can be assigned to a newly created profile.
Mike Lerman 2015/08/06 16:06:19 insert "a" before "unique"
47 virtual base::string16 ChooseNameForNewProfile(size_t icon_index) const = 0;
48
49 // Determines whether |name| is one of the default assigned names.
50 virtual bool IsDefaultProfileName(const base::string16& name) const = 0;
51
52 // Saves the avatar |image| at |image_path|. This is used both for the
53 // GAIA profile pictures and the ProfileAvatarDownloader that is used to
54 // download the high res avatars.
55 virtual void SaveAvatarImageAtPath(const gfx::Image* image,
56 const std::string& key,
57 const base::FilePath& image_path,
58 const base::FilePath& profile_path) = 0;
59
60 virtual const base::FilePath& GetUserDataDir() const = 0;
61
62 virtual void AddObserver(ProfileInfoCacheObserver* observer) = 0;
63 virtual void RemoveObserver(ProfileInfoCacheObserver* observer) = 0;
64
45 DISALLOW_COPY_AND_ASSIGN(ProfileAttributesStorage); 65 DISALLOW_COPY_AND_ASSIGN(ProfileAttributesStorage);
46 }; 66 };
47 67
48 #endif // CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_ 68 #endif // CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698