Commit aa18c6a3 authored by Victor Hugo Vianna Silva's avatar Victor Hugo Vianna Silva Committed by Commit Bot

Rename PSS::RecordMemoryUsageHistograms to mention entity counts

This method also records counts for sync entities, so its name and
documentation should be updated. The name is chosen to match the
corresponding method in DataTypeControlller.

Bug: None
Change-Id: I6333884975c60ac78f7e3de5b54ed43ed51077ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2424227
Auto-Submit: Victor Vianna <victorvianna@google.com>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/master@{#810256}
parent 12766831
...@@ -1155,7 +1155,7 @@ void ProfileSyncService::OnConfigureDone( ...@@ -1155,7 +1155,7 @@ void ProfileSyncService::OnConfigureDone(
return; return;
} }
RecordMemoryUsageHistograms(); RecordMemoryUsageAndCountsHistograms();
StartSyncingWithServer(); StartSyncingWithServer();
} }
...@@ -2008,7 +2008,7 @@ void ProfileSyncService::RemoveClientFromServer() const { ...@@ -2008,7 +2008,7 @@ void ProfileSyncService::RemoveClientFromServer() const {
} }
} }
void ProfileSyncService::RecordMemoryUsageHistograms() { void ProfileSyncService::RecordMemoryUsageAndCountsHistograms() {
ModelTypeSet active_types = GetActiveDataTypes(); ModelTypeSet active_types = GetActiveDataTypes();
for (ModelType type : active_types) { for (ModelType type : active_types) {
auto dtc_it = data_type_controllers_.find(type); auto dtc_it = data_type_controllers_.find(type);
......
...@@ -356,8 +356,9 @@ class ProfileSyncService : public SyncService, ...@@ -356,8 +356,9 @@ class ProfileSyncService : public SyncService,
// Tell the sync server that this client has disabled sync. // Tell the sync server that this client has disabled sync.
void RemoveClientFromServer() const; void RemoveClientFromServer() const;
// Estimates and records memory usage histograms per type. // Records per type histograms for estimated memory usage and number of
void RecordMemoryUsageHistograms(); // entities.
void RecordMemoryUsageAndCountsHistograms();
// True if setup has been completed at least once and is not in progress. // True if setup has been completed at least once and is not in progress.
bool CanConfigureDataTypes(bool bypass_setup_in_progress_check) const; bool CanConfigureDataTypes(bool bypass_setup_in_progress_check) const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment