Index: chrome/browser/profiles/profile_manager.cc |
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc |
index a1d792243b5e89c9dd1492ceff3729165a00774c..745f8c8f9b5eba7d93e8e5b1e0beb9be255b0d3f 100644 |
--- a/chrome/browser/profiles/profile_manager.cc |
+++ b/chrome/browser/profiles/profile_manager.cc |
@@ -564,3 +564,22 @@ bool ProfileManager::IsMultipleProfilesEnabled() { |
#endif |
return CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles); |
} |
+ |
+int ProfileManager::TotalDownloadCount() const { |
+ int count = 0; |
+ |
+ for (ProfilesInfoMap::const_iterator iter = profiles_info_.begin(); |
+ iter != profiles_info_.end(); ++iter) { |
+ if (!iter->second->created) |
+ continue; |
+ |
+ Profile* p = iter->second->profile.get(); |
+ |
+ count += p->DownloadCount(); |
+ |
+ if (p->HasOffTheRecordProfile()) |
+ count += p->GetOffTheRecordProfile()->DownloadCount(); |
+ } |
+ |
+ return count; |
+} |