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

Unified Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 57943005: app_list: Clear start page contents on NOTIFICATION_PROFILE_DESTROYED (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/ui/app_list/start_page_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/start_page_service.cc
diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc
index 6c9d35f70f0995310ef430ccaadf335c8b2f32e8..947c251972d8127eb67ca299374e32c9f26f4f46 100644
--- a/chrome/browser/ui/app_list/start_page_service.cc
+++ b/chrome/browser/ui/app_list/start_page_service.cc
@@ -64,28 +64,30 @@ class StartPageService::Factory : public BrowserContextKeyedServiceFactory {
DISALLOW_COPY_AND_ASSIGN(Factory);
};
-class StartPageService::ExitObserver : public content::NotificationObserver {
+class StartPageService::ProfileDestroyObserver
+ : public content::NotificationObserver {
public:
- explicit ExitObserver(StartPageService* service) : service_(service) {
+ explicit ProfileDestroyObserver(StartPageService* service)
+ : service_(service) {
registrar_.Add(this,
- chrome::NOTIFICATION_APP_TERMINATING,
+ chrome::NOTIFICATION_PROFILE_DESTROYED,
content::NotificationService::AllSources());
}
- virtual ~ExitObserver() {}
+ virtual ~ProfileDestroyObserver() {}
private:
// content::NotificationObserver
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE {
- DCHECK_EQ(chrome::NOTIFICATION_APP_TERMINATING, type);
+ DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type);
service_->Shutdown();
}
StartPageService* service_; // Owner of this class.
content::NotificationRegistrar registrar_;
- DISALLOW_COPY_AND_ASSIGN(ExitObserver);
+ DISALLOW_COPY_AND_ASSIGN(ProfileDestroyObserver);
};
// static
@@ -95,7 +97,7 @@ StartPageService* StartPageService::Get(Profile* profile) {
StartPageService::StartPageService(Profile* profile)
: profile_(profile),
- exit_observer_(new ExitObserver(this)),
+ profile_destroy_observer_(new ProfileDestroyObserver(this)),
recommended_apps_(new RecommendedApps(profile)) {
contents_.reset(content::WebContents::Create(
content::WebContents::CreateParams(profile_)));
« no previous file with comments | « chrome/browser/ui/app_list/start_page_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698