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

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

Issue 1599013002: Follow-up of Improve the ProfileInfoCache API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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_statistics.cc
diff --git a/chrome/browser/profiles/profile_statistics.cc b/chrome/browser/profiles/profile_statistics.cc
index 923cc38bc92bd57ab33a5ef992f59da07ff32e3b..0cc5f220feb2f036395140f7459d2cca7eadbc1c 100644
--- a/chrome/browser/profiles/profile_statistics.cc
+++ b/chrome/browser/profiles/profile_statistics.cc
@@ -18,7 +18,6 @@
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/profiles/profile_attributes_entry.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
-#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/bookmark_model_observer.h"
@@ -354,10 +353,9 @@ void GatherProfileStatistics(Profile* profile,
ProfileCategoryStats GetProfileStatisticsFromCache(
lwchkg 2016/01/17 12:33:28 This function will be renamed to GetProfileStatist
anthonyvd 2016/01/18 15:22:31 I think this functionality (as well as the other o
lwchkg 2016/01/18 17:54:02 The decision of putting these two functions here w
const base::FilePath& profile_path) {
- ProfileInfoCache& profile_info_cache =
- g_browser_process->profile_manager()->GetProfileInfoCache();
ProfileAttributesEntry* entry = nullptr;
- bool has_entry = profile_info_cache.
+ bool has_entry = g_browser_process->profile_manager()->
+ GetProfileAttributesStorage().
GetProfileAttributesWithPath(profile_path, &entry);
ProfileCategoryStats stats;
@@ -397,9 +395,9 @@ void SetProfileStatisticsInCache(const base::FilePath& profile_path,
if (!profile_manager)
return;
- ProfileInfoCache& profile_info_cache = profile_manager->GetProfileInfoCache();
ProfileAttributesEntry* entry = nullptr;
- if (!profile_info_cache.GetProfileAttributesWithPath(profile_path, &entry))
+ if (!profile_manager->GetProfileAttributesStorage().
+ GetProfileAttributesWithPath(profile_path, &entry))
return;
if (category == kProfileStatisticsBrowsingHistory) {

Powered by Google App Engine
This is Rietveld 408576698