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

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

Issue 10824020: Move PROFILE_DESTROYED notification to ProfileDestroyer and observe it in ExtensionProcessManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: destroy original profile->destroy incognito EPM Created 8 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.h
diff --git a/chrome/browser/profiles/profile.h b/chrome/browser/profiles/profile.h
index 9b3e9d9b884dfa9721db0b5c9741e3aa20e8a574..37dd180c3ad3378f9e76099fe91b0a32b81c15e2 100644
--- a/chrome/browser/profiles/profile.h
+++ b/chrome/browser/profiles/profile.h
@@ -390,6 +390,11 @@ class Profile : public content::BrowserContext {
// disabled or controlled by configuration management.
bool IsSyncAccessible();
+ // Send NOTIFICATION_PROFILE_DESTROYED for this Profile, if it has not
+ // already been sent. It is necessary because most Profiles are destroyed by
+ // ProfileDestroyer, but in tests, some are not.
+ void MaybeSendDestroyedNotification();
+
// Creates an OffTheRecordProfile which points to this Profile.
Profile* CreateOffTheRecordProfile();
@@ -409,6 +414,10 @@ class Profile : public content::BrowserContext {
private:
bool restored_last_session_;
+ // Used to prevent the notification that this Profile is destroyed from
+ // being sent twice.
+ bool sent_destroyed_notification_;
+
// Accessibility events will only be propagated when the pause
// level is zero. PauseAccessibilityEvents and ResumeAccessibilityEvents
// increment and decrement the level, respectively, rather than set it to

Powered by Google App Engine
This is Rietveld 408576698