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

Unified Diff: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc

Issue 1579433002: Make profile statistics tasks inspectable by tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make ProfileStatisticsAggregator tasks trackable 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/ui/webui/signin/user_manager_screen_handler.cc
diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
index 2cc57cbdba2ad6636f1a3413fa4a884cbd8c047e..688f366d1643e1ccd10d96c12d0372eb909823ed 100644
--- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
+++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
@@ -597,7 +597,7 @@ void UserManagerScreenHandler::HandleRemoveUserWarningLoadStats(
// false), then the actual statistics are queried instead.
base::DictionaryValue return_value;
profiles::ProfileCategoryStats stats =
- profiles::GetProfileStatisticsFromCache(profile_path);
+ ProfileStatistics::GetProfileStatisticsFromCache(profile_path);
bool stats_success = true;
for (const auto& item : stats) {
scoped_ptr<base::DictionaryValue> stat(new base::DictionaryValue);
@@ -614,12 +614,11 @@ void UserManagerScreenHandler::HandleRemoveUserWarningLoadStats(
}
}
- profiles::GatherProfileStatistics(
+ ProfileStatistics::GatherProfileStatistics(
profile,
base::Bind(
&UserManagerScreenHandler::RemoveUserDialogLoadStatsCallback,
- weak_ptr_factory_.GetWeakPtr(), profile_path),
- &tracker_);
+ weak_ptr_factory_.GetWeakPtr(), profile_path));
}
void UserManagerScreenHandler::RemoveUserDialogLoadStatsCallback(
@@ -909,7 +908,7 @@ void UserManagerScreenHandler::SendUserList() {
kKeyAvatarUrl, GetAvatarImageAtIndex(i, info_cache));
profiles::ProfileCategoryStats stats =
- profiles::GetProfileStatisticsFromCache(profile_path);
+ ProfileStatistics::GetProfileStatisticsFromCache(profile_path);
scoped_ptr<base::DictionaryValue> stats_dict(new base::DictionaryValue);
for (const auto& item : stats) {
scoped_ptr<base::DictionaryValue> stat(new base::DictionaryValue);

Powered by Google App Engine
This is Rietveld 408576698