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

Side by Side Diff: chrome/browser/ui/app_list/start_page_service.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/start_page_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_
6 #define CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 21 matching lines...) Expand all
32 // Gets the instance for the given profile. 32 // Gets the instance for the given profile.
33 static StartPageService* Get(Profile* profile); 33 static StartPageService* Get(Profile* profile);
34 34
35 content::WebContents* contents() { return contents_.get(); } 35 content::WebContents* contents() { return contents_.get(); }
36 RecommendedApps* recommended_apps() { return recommended_apps_.get(); } 36 RecommendedApps* recommended_apps() { return recommended_apps_.get(); }
37 37
38 private: 38 private:
39 // A BrowserContextKeyedServiceFactory for this service. 39 // A BrowserContextKeyedServiceFactory for this service.
40 class Factory; 40 class Factory;
41 41
42 // ExitObserver to shutdown the service on exiting. WebContents depends 42 // ProfileDestroyObserver to shutdown the service on exiting. WebContents
43 // on the profile and needs to be closed before the profile and its 43 // depends on the profile and needs to be closed before the profile and its
44 // keyed service shutdown. 44 // keyed service shutdown.
45 class ExitObserver; 45 class ProfileDestroyObserver;
46 46
47 explicit StartPageService(Profile* profile); 47 explicit StartPageService(Profile* profile);
48 virtual ~StartPageService(); 48 virtual ~StartPageService();
49 49
50 // BrowserContextKeyedService overrides: 50 // BrowserContextKeyedService overrides:
51 virtual void Shutdown() OVERRIDE; 51 virtual void Shutdown() OVERRIDE;
52 52
53 Profile* profile_; 53 Profile* profile_;
54 scoped_ptr<content::WebContents> contents_; 54 scoped_ptr<content::WebContents> contents_;
55 scoped_ptr<ExitObserver> exit_observer_; 55 scoped_ptr<ProfileDestroyObserver> profile_destroy_observer_;
56 scoped_ptr<RecommendedApps> recommended_apps_; 56 scoped_ptr<RecommendedApps> recommended_apps_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(StartPageService); 58 DISALLOW_COPY_AND_ASSIGN(StartPageService);
59 }; 59 };
60 60
61 } // namespace app_list 61 } // namespace app_list
62 62
63 #endif // CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ 63 #endif // CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/start_page_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698