Index: chrome/browser/profiles/profile_manager.cc |
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc |
index bebade40eb9c1f6ad6c676b532728cfc34f5ae5e..e0951727c8b005b157e9f7ce91749596f341ce8d 100644 |
--- a/chrome/browser/profiles/profile_manager.cc |
+++ b/chrome/browser/profiles/profile_manager.cc |
@@ -556,3 +556,22 @@ bool ProfileManager::IsMultipleProfilesEnabled() { |
return CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles); |
#endif |
} |
+ |
+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; |
+} |