| Index: chrome/browser/profiles/profile_manager.cc
|
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
| index 9e286c6102735c5a32a903d6f41de235bdc9cdcf..e92aa9da80b4e38fdd3b2f12855a73ecdc6f2a4c 100644
|
| --- a/chrome/browser/profiles/profile_manager.cc
|
| +++ b/chrome/browser/profiles/profile_manager.cc
|
| @@ -567,3 +567,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;
|
| +}
|
|
|