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

Unified Diff: chrome/browser/profiles/profile_attributes_entry.cc

Issue 1415223002: Add counts of User data to ProfileInfoCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added methods in profile_statistics.cc to access ProfileInfoCache, fixed a few style errors 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_attributes_entry.cc
diff --git a/chrome/browser/profiles/profile_attributes_entry.cc b/chrome/browser/profiles/profile_attributes_entry.cc
index 8c9757615c933feaeb5279174789b98d6d7d6b2e..3adf2a0bffd53c2632b46826be473144bed427bc 100644
--- a/chrome/browser/profiles/profile_attributes_entry.cc
+++ b/chrome/browser/profiles/profile_attributes_entry.cc
@@ -130,6 +130,44 @@ size_t ProfileAttributesEntry::GetAvatarIconIndex() const {
profile_index());
}
+bool ProfileAttributesEntry::HasStatsBrowsingHistory() const {
+ return profile_info_cache_->HasStatsBrowsingHistoryOfProfileAtIndex(
+ profile_index());
+}
+
+int ProfileAttributesEntry::GetStatsBrowsingHistory() const {
+ return profile_info_cache_->GetStatsBrowsingHistoryOfProfileAtIndex(
+ profile_index());
+}
+
+bool ProfileAttributesEntry::HasStatsPasswords() const {
+ return profile_info_cache_->HasStatsPasswordsOfProfileAtIndex(
+ profile_index());
+}
+
+int ProfileAttributesEntry::GetStatsPasswords() const {
+ return profile_info_cache_->GetStatsPasswordsOfProfileAtIndex(
+ profile_index());
+}
+
+bool ProfileAttributesEntry::HasStatsBookmarks() const {
+ return profile_info_cache_->HasStatsBookmarksOfProfileAtIndex(
+ profile_index());
+}
+
+int ProfileAttributesEntry::GetStatsBookmarks() const {
+ return profile_info_cache_->GetStatsBookmarksOfProfileAtIndex(
+ profile_index());
+}
+
+bool ProfileAttributesEntry::HasStatsSettings() const {
+ return profile_info_cache_->HasStatsSettingsOfProfileAtIndex(profile_index());
+}
+
+int ProfileAttributesEntry::GetStatsSettings() const {
+ return profile_info_cache_->GetStatsSettingsOfProfileAtIndex(profile_index());
+}
+
void ProfileAttributesEntry::SetName(const base::string16& name) {
profile_info_cache_->SetNameOfProfileAtIndex(profile_index(), name);
}
@@ -206,6 +244,25 @@ void ProfileAttributesEntry::SetAvatarIconIndex(size_t icon_index) {
profile_index(), icon_index);
}
+void ProfileAttributesEntry::SetStatsBrowsingHistory(int value) {
+ profile_info_cache_->SetStatsBrowsingHistoryOfProfileAtIndex(profile_index(),
+ value);
+}
+
+void ProfileAttributesEntry::SetStatsPasswords(int value) {
+ profile_info_cache_->SetStatsPasswordsOfProfileAtIndex(profile_index(),
+ value);
+}
+
+void ProfileAttributesEntry::SetStatsBookmarks(int value) {
+ profile_info_cache_->SetStatsBookmarksOfProfileAtIndex(profile_index(),
+ value);
+}
+
+void ProfileAttributesEntry::SetStatsSettings(int value) {
+ profile_info_cache_->SetStatsSettingsOfProfileAtIndex(profile_index(), value);
+}
+
void ProfileAttributesEntry::SetAuthInfo(
const std::string& gaia_id, const base::string16& user_name) {
profile_info_cache_->SetAuthInfoOfProfileAtIndex(

Powered by Google App Engine
This is Rietveld 408576698