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

Unified Diff: chrome/browser/profiles/profile_manager.h

Issue 14923004: [Mac] AppController needs to update its "last profile" pointer when the active profile is deleted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 7 years, 6 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_manager.h
diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h
index 21f403302a6ae4f8ed09b55705dde1d8e942d6f6..12aadb72f02030ba170ac2b87ae50e0dcb6428d4 100644
--- a/chrome/browser/profiles/profile_manager.h
+++ b/chrome/browser/profiles/profile_manager.h
@@ -289,6 +289,12 @@ class ProfileManager : public base::NonThreadSafe,
// Returns true if the profile was added, false otherwise.
bool AddProfile(Profile* profile);
+ // Schedules the profile at the given path to be deleted on shutdown.
+ void FinishDeletingProfile(const base::FilePath& profile_dir);
+
+ // Returns true if |profile_dir| has been added to ProfilesToDelete.
+ bool IsProfileMarkedForDeletion(const base::FilePath& profile_dir);
+
// Registers profile with given info. Returns pointer to created ProfileInfo
// entry.
ProfileInfo* RegisterProfile(Profile* profile, bool created);
@@ -326,6 +332,17 @@ class ProfileManager : public base::NonThreadSafe,
Profile* profile,
Profile::CreateStatus status);
+ // If the |loaded_profile| has been loaded succesfully (according to |status|)
+ // and isn't already scheduled for deletion, then finishes adding
+ // |profile_to_delete_dir| to the queue of profiles to be deleted, and updates
+ // the kProfileLastUsed preference to |last_non_managed_profile|.
+ void OnNewActiveProfileLoaded(
+ const base::FilePath& profile_to_delete_dir,
+ const base::FilePath& last_non_managed_profile_path,
+ const CreateCallback& original_callback,
+ Profile* loaded_profile,
+ Profile::CreateStatus status);
+
content::NotificationRegistrar registrar_;
// The path to the user data directory (DIR_USER_DATA).

Powered by Google App Engine
This is Rietveld 408576698