Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1803)

Unified Diff: chrome/browser/profiles/profile_window.cc

Issue 1220843003: Perform online reauth when password is changed for a locked profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698