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

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

Issue 476993002: [Profiles] Fix the usage of custom/default names and avatars (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
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_PROFILES_PROFILE_INFO_CACHE_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Warning: This will re-sort profiles and thus may change indices! 114 // Warning: This will re-sort profiles and thus may change indices!
115 void SetGAIAGivenNameOfProfileAtIndex(size_t index, 115 void SetGAIAGivenNameOfProfileAtIndex(size_t index,
116 const base::string16& name); 116 const base::string16& name);
117 void SetGAIAPictureOfProfileAtIndex(size_t index, const gfx::Image* image); 117 void SetGAIAPictureOfProfileAtIndex(size_t index, const gfx::Image* image);
118 void SetIsUsingGAIAPictureOfProfileAtIndex(size_t index, bool value); 118 void SetIsUsingGAIAPictureOfProfileAtIndex(size_t index, bool value);
119 void SetProfileSigninRequiredAtIndex(size_t index, bool value); 119 void SetProfileSigninRequiredAtIndex(size_t index, bool value);
120 void SetProfileIsEphemeralAtIndex(size_t index, bool value); 120 void SetProfileIsEphemeralAtIndex(size_t index, bool value);
121 void SetProfileIsUsingDefaultNameAtIndex(size_t index, bool value); 121 void SetProfileIsUsingDefaultNameAtIndex(size_t index, bool value);
122 void SetProfileIsUsingDefaultAvatarAtIndex(size_t index, bool value); 122 void SetProfileIsUsingDefaultAvatarAtIndex(size_t index, bool value);
123 123
124 // Whether |name| is one of the default assigned names.
Roger Tawa OOO till Jul 10th 2014/08/15 14:46:40 Determines whether |name| ...
noms (inactive) 2014/08/15 16:22:47 Done.
125 bool IsDefaultProfileName(const base::string16& name);
126
124 // Returns unique name that can be assigned to a newly created profile. 127 // Returns unique name that can be assigned to a newly created profile.
125 base::string16 ChooseNameForNewProfile(size_t icon_index) const; 128 base::string16 ChooseNameForNewProfile(size_t icon_index) const;
126 129
127 // Returns an avatar icon index that can be assigned to a newly created 130 // Returns an avatar icon index that can be assigned to a newly created
128 // profile. Note that the icon may not be unique since there are a limited 131 // profile. Note that the icon may not be unique since there are a limited
129 // set of default icons. 132 // set of default icons.
130 size_t ChooseAvatarIconIndexForNewProfile() const; 133 size_t ChooseAvatarIconIndexForNewProfile() const;
131 134
132 const base::FilePath& GetUserDataDir() const; 135 const base::FilePath& GetUserDataDir() const;
133 136
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // This prevents a picture from being downloaded multiple times. The 224 // This prevents a picture from being downloaded multiple times. The
222 // ProfileAvatarDownloader instances are deleted when the download completes 225 // ProfileAvatarDownloader instances are deleted when the download completes
223 // or when the ProfileInfoCache is destroyed. 226 // or when the ProfileInfoCache is destroyed.
224 mutable std::map<std::string, ProfileAvatarDownloader*> 227 mutable std::map<std::string, ProfileAvatarDownloader*>
225 avatar_images_downloads_in_progress_; 228 avatar_images_downloads_in_progress_;
226 229
227 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); 230 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache);
228 }; 231 };
229 232
230 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ 233 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698