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

Unified Diff: chrome/browser/profiles/profile_statistics.h

Issue 1415223002: Add counts of User data to ProfileInfoCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix. Removed a non-trivial style fix (will upload in another CL). 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
« no previous file with comments | « chrome/browser/profiles/profile_info_cache.cc ('k') | chrome/browser/profiles/profile_statistics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_statistics.h
diff --git a/chrome/browser/profiles/profile_statistics.h b/chrome/browser/profiles/profile_statistics.h
index 94c29739e710a5a053a1e85256aec35adb4ca522..61bba0d7c93cc61d941e1d3bf5180d7be1e695ca 100644
--- a/chrome/browser/profiles/profile_statistics.h
+++ b/chrome/browser/profiles/profile_statistics.h
@@ -8,6 +8,7 @@
#include <string>
#include <utility>
#include <vector>
+#include "base/files/file_path.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/profiles/profile.h"
@@ -36,6 +37,8 @@ using ProfileCategoryStats = std::vector<ProfileCategoryStat>;
// |ProfileCategoryStats| is made each time the callback is called.
using ProfileStatisticsCallback = base::Callback<void(ProfileCategoryStats)>;
+// Profile Statistics ----------------------------------------------------------
+
// This function collects statistical information about |profile| and returns
// the information via |callback|. Currently bookmarks, history, logins and
// preferences are counted. The callback function will probably be called more
@@ -44,6 +47,16 @@ void GetProfileStatistics(Profile* profile,
const ProfileStatisticsCallback& callback,
base::CancelableTaskTracker* tracker);
+// ProfileInfoCache ------------------------------------------------------------
+
+// Gets statistical information from ProfileInfoCache.
+ProfileCategoryStats GetProfileStatisticsFromCache(
+ const base::FilePath& profile_path);
+
+// Sets an individual statistic to ProfileInfoCache.
+void SetProfileStatisticsInCache(const base::FilePath& profile_path,
+ const std::string& category, int count);
+
} // namespace profiles
#endif // CHROME_BROWSER_PROFILES_PROFILE_STATISTICS_H_
« no previous file with comments | « chrome/browser/profiles/profile_info_cache.cc ('k') | chrome/browser/profiles/profile_statistics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698