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

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: derp. no test on CrOS either. 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
« no previous file with comments | « chrome/browser/app_controller_mac_unittest.mm ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1b2ba421ffad50d93203d07e115a36a9e98a5017 100644
--- a/chrome/browser/profiles/profile_manager.h
+++ b/chrome/browser/profiles/profile_manager.h
@@ -289,6 +289,9 @@ 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);
+
// Registers profile with given info. Returns pointer to created ProfileInfo
// entry.
ProfileInfo* RegisterProfile(Profile* profile, bool created);
@@ -326,6 +329,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 based on |last_non_managed_profile_path|.
+ void OnNewActiveProfileLoaded(
+ const base::FilePath& profile_to_delete_path,
+ 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).
« no previous file with comments | « chrome/browser/app_controller_mac_unittest.mm ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698