Index: chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.cc |
diff --git a/chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.cc b/chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.cc |
index 60ec741691a6160e6fb02412b393bfb035aeac18..ee03b9b76d9f15aa269151159bd70841c3c7ba5b 100644 |
--- a/chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.cc |
+++ b/chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.cc |
@@ -232,12 +232,14 @@ SupervisedUserSharedSettingsService::MergeDataAndStartSyncing( |
SyncChangeList change_list; |
const DictionaryValue* all_settings = |
prefs_->GetDictionary(prefs::kSupervisedUserSharedSettings); |
+ int num_association = 0; |
for (DictionaryValue::Iterator it(*all_settings); !it.IsAtEnd(); |
it.Advance()) { |
const DictionaryValue* dict = NULL; |
bool success = it.value().GetAsDictionary(&dict); |
DCHECK(success); |
+ num_association += dict->size(); |
const std::set<std::string>& seen = seen_keys[it.key()]; |
for (DictionaryValue::Iterator jt(*dict); !jt.IsAtEnd(); jt.Advance()) { |
// We only need to upload settings that we haven't seen in the initial |
@@ -259,7 +261,9 @@ SupervisedUserSharedSettingsService::MergeDataAndStartSyncing( |
sync_processor_->ProcessSyncChanges(FROM_HERE, change_list)); |
} |
- // TODO(bauerb): Statistics? |
+ result.set_num_items_added(change_list.size()); |
Bernhard Bauer
2016/01/05 09:37:30
Wait, is this right? IIUC, num_items_added is the
Deepak
2016/01/05 13:29:19
Done.
|
+ result.set_num_items_before_association(num_association - change_list.size()); |
+ result.set_num_items_after_association(num_association); |
return result; |
} |