| Index: chrome/browser/profiles/profile_manager.cc
|
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
| index f318724d66073cefe0b16ef692270d23d425ceeb..c44e21874985faa61a0aa9da9f30dc9687d016ef 100644
|
| --- a/chrome/browser/profiles/profile_manager.cc
|
| +++ b/chrome/browser/profiles/profile_manager.cc
|
| @@ -139,6 +139,19 @@ Profile* ProfileManager::GetProfile(const FilePath& profile_dir) {
|
| return GetProfile(profile_dir, true);
|
| }
|
|
|
| +Profile* ProfileManager::GetProfileWithId(ProfileId profile_id) {
|
| + DCHECK_NE(Profile::kInvalidProfileId, profile_id);
|
| + for (iterator i = begin(); i != end(); ++i) {
|
| + if ((*i)->GetRuntimeId() == profile_id)
|
| + return *i;
|
| + if ((*i)->HasOffTheRecordProfile() &&
|
| + (*i)->GetOffTheRecordProfile()->GetRuntimeId() == profile_id) {
|
| + return (*i)->GetOffTheRecordProfile();
|
| + }
|
| + }
|
| + return NULL;
|
| +}
|
| +
|
| bool ProfileManager::IsValidProfile(Profile* profile) {
|
| for (iterator i = begin(); i != end(); ++i) {
|
| if (*i == profile)
|
|
|