Chromium Code Reviews| Index: chrome/browser/profiles/profile_window.cc |
| diff --git a/chrome/browser/profiles/profile_window.cc b/chrome/browser/profiles/profile_window.cc |
| index 90b4a353a72c3cdac755418a72c60639a111cf9d..e2a69e07bb11362bf613d35072b560d0dfcaeeef 100644 |
| --- a/chrome/browser/profiles/profile_window.cc |
| +++ b/chrome/browser/profiles/profile_window.cc |
| @@ -244,6 +244,18 @@ const char kUserManagerSelectProfileChromeSettings[] = "#chrome-settings"; |
| const char kUserManagerSelectProfileChromeMemory[] = "#chrome-memory"; |
| const char kUserManagerSelectProfileAppLauncher[] = "#app-launcher"; |
| +base::FilePath GetPathOfProfileWithEmail(ProfileManager* profile_manager, |
| + const std::string& email) { |
| + const base::string16& profile_email = base::UTF8ToUTF16(email); |
|
Alexei Svitkine (slow)
2015/07/24 16:36:42
This shouldn't be a ref.
Roger Tawa OOO till Jul 10th
2015/07/24 17:01:29
Oops, my bad. Copy and paste problem...
|
| + std::vector<ProfileAttributesEntry*> entries = |
| + profile_manager->GetProfileInfoCache().GetAllProfilesAttributes(); |
| + for (auto entry : entries) { |
|
Alexei Svitkine (slow)
2015/07/24 16:36:42
Nit: I'd write out the auto here - since ProfileAt
Roger Tawa OOO till Jul 10th
2015/07/24 17:01:29
Done.
|
| + if (entry->GetUserName() == profile_email) |
| + return entry->GetPath(); |
| + } |
| + return base::FilePath(); |
| +} |
| + |
| void FindOrCreateNewWindowForProfile( |
| Profile* profile, |
| chrome::startup::IsProcessStartup process_startup, |