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

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

Issue 1415223002: Add counts of User data to ProfileInfoCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change GetStatistic from int(...) back to bool(..., int*) Created 5 years, 1 month 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 (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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 bool ProfileIsSigninRequiredAtIndex(size_t index) const override; 98 bool ProfileIsSigninRequiredAtIndex(size_t index) const override;
99 std::string GetSupervisedUserIdOfProfileAtIndex(size_t index) const override; 99 std::string GetSupervisedUserIdOfProfileAtIndex(size_t index) const override;
100 bool ProfileIsEphemeralAtIndex(size_t index) const override; 100 bool ProfileIsEphemeralAtIndex(size_t index) const override;
101 bool ProfileIsUsingDefaultNameAtIndex(size_t index) const override; 101 bool ProfileIsUsingDefaultNameAtIndex(size_t index) const override;
102 bool ProfileIsAuthenticatedAtIndex(size_t index) const override; 102 bool ProfileIsAuthenticatedAtIndex(size_t index) const override;
103 bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const override; 103 bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const override;
104 bool ProfileIsAuthErrorAtIndex(size_t index) const; 104 bool ProfileIsAuthErrorAtIndex(size_t index) const;
105 105
106 size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const; 106 size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const;
107 107
108 bool GetStatisticOfProfileAtIndex(size_t index, const std::string& category,
Mike Lerman 2015/11/10 15:31:18 All the other ProfileInfoCache methods just return
109 int* out_value) const;
110 std::map<std::string, int> GetAllStatisticsOfProfileAtIndex(size_t index)
Mike Lerman 2015/11/10 15:31:18 I thought the profileInfoCache wasn't going to ret
111 const;
112
108 void SetProfileActiveTimeAtIndex(size_t index); 113 void SetProfileActiveTimeAtIndex(size_t index);
109 // Warning: This will re-sort profiles and thus may change indices! 114 // Warning: This will re-sort profiles and thus may change indices!
110 void SetNameOfProfileAtIndex(size_t index, const base::string16& name); 115 void SetNameOfProfileAtIndex(size_t index, const base::string16& name);
111 void SetShortcutNameOfProfileAtIndex(size_t index, 116 void SetShortcutNameOfProfileAtIndex(size_t index,
112 const base::string16& name); 117 const base::string16& name);
113 void SetAuthInfoOfProfileAtIndex(size_t index, 118 void SetAuthInfoOfProfileAtIndex(size_t index,
114 const std::string& gaia_id, 119 const std::string& gaia_id,
115 const base::string16& user_name); 120 const base::string16& user_name);
116 void SetAvatarIconOfProfileAtIndex(size_t index, size_t icon_index); 121 void SetAvatarIconOfProfileAtIndex(size_t index, size_t icon_index);
117 void SetIsOmittedProfileAtIndex(size_t index, bool is_omitted); 122 void SetIsOmittedProfileAtIndex(size_t index, bool is_omitted);
(...skipping 21 matching lines...) Expand all
139 bool IsDefaultProfileName(const base::string16& name) const; 144 bool IsDefaultProfileName(const base::string16& name) const;
140 145
141 // Returns unique name that can be assigned to a newly created profile. 146 // Returns unique name that can be assigned to a newly created profile.
142 base::string16 ChooseNameForNewProfile(size_t icon_index) const; 147 base::string16 ChooseNameForNewProfile(size_t icon_index) const;
143 148
144 // Returns an avatar icon index that can be assigned to a newly created 149 // Returns an avatar icon index that can be assigned to a newly created
145 // profile. Note that the icon may not be unique since there are a limited 150 // profile. Note that the icon may not be unique since there are a limited
146 // set of default icons. 151 // set of default icons.
147 size_t ChooseAvatarIconIndexForNewProfile() const; 152 size_t ChooseAvatarIconIndexForNewProfile() const;
148 153
154 void SetStatisticOfProfileAtIndex(size_t index, const std::string& category,
Mike Lerman 2015/11/10 15:31:18 comment please.
155 int value);
156
149 const base::FilePath& GetUserDataDir() const; 157 const base::FilePath& GetUserDataDir() const;
150 158
151 // Register cache related preferences in Local State. 159 // Register cache related preferences in Local State.
152 static void RegisterPrefs(PrefRegistrySimple* registry); 160 static void RegisterPrefs(PrefRegistrySimple* registry);
153 161
154 // Checks whether the high res avatar at index |icon_index| exists, and 162 // Checks whether the high res avatar at index |icon_index| exists, and
155 // if it does not, calls |DownloadHighResAvatar|. 163 // if it does not, calls |DownloadHighResAvatar|.
156 void DownloadHighResAvatarIfNeeded(size_t icon_index, 164 void DownloadHighResAvatarIfNeeded(size_t icon_index,
157 const base::FilePath& profile_path); 165 const base::FilePath& profile_path);
158 166
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 avatar_images_downloads_in_progress_; 276 avatar_images_downloads_in_progress_;
269 277
270 // Determines of the ProfileAvatarDownloader should be created and executed 278 // Determines of the ProfileAvatarDownloader should be created and executed
271 // or not. Only set to true for tests. 279 // or not. Only set to true for tests.
272 bool disable_avatar_download_for_testing_; 280 bool disable_avatar_download_for_testing_;
273 281
274 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); 282 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache);
275 }; 283 };
276 284
277 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ 285 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698