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

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

Issue 1415223002: Add counts of User data to ProfileInfoCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_attributes_entry.h
diff --git a/chrome/browser/profiles/profile_attributes_entry.h b/chrome/browser/profiles/profile_attributes_entry.h
index 898557792594d675337a446ae23b823c990f8b63..26ccff84f17ffc8707005970fa7bbdb326d8ed68 100644
--- a/chrome/browser/profiles/profile_attributes_entry.h
+++ b/chrome/browser/profiles/profile_attributes_entry.h
@@ -10,6 +10,7 @@
#include "base/files/file_path.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
+#include "base/values.h"
namespace gfx {
class Image;
@@ -83,6 +84,12 @@ class ProfileAttributesEntry {
bool IsAuthError() const;
// Returns the index of the default icon used by the profile.
size_t GetAvatarIconIndex() const;
+ // Get the statistic of a given |category| of the profile in |out_value| if
+ // the statistic of the |category| exists. Returns true if succeed.
+ bool GetStatistic(const std::string& category, int* out_value) const;
+ // Returns all the statistics of the profile.
+ std::map<std::string, int> GetAllStatistics() const;
+ scoped_ptr<base::DictionaryValue> GetAllStatisticsAsDictionaryValue() const;
void SetName(const base::string16& name);
void SetShortcutName(const base::string16& name);
@@ -101,6 +108,7 @@ class ProfileAttributesEntry {
void SetIsUsingDefaultAvatar(bool value);
void SetIsAuthError(bool value);
void SetAvatarIconIndex(size_t icon_index);
+ void SetStatistic(const std::string& category, int value);
void SetAuthInfo(const std::string& gaia_id,
const base::string16& user_name);
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_attributes_entry.cc » ('j') | chrome/browser/profiles/profile_info_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698