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

Unified Diff: apps/app_restore_service.h

Issue 2729503007: Remove Profile usage from //apps (Closed)
Patch Set: deps Created 3 years, 9 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 | « apps/app_load_service_factory.cc ('k') | apps/app_restore_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/app_restore_service.h
diff --git a/apps/app_restore_service.h b/apps/app_restore_service.h
index 72f5769b36b8512739758ba02d23e7966041cf5c..63948a23b079f059acd054c8758d914fdc045a47 100644
--- a/apps/app_restore_service.h
+++ b/apps/app_restore_service.h
@@ -16,7 +16,9 @@ namespace extensions {
class Extension;
}
-class Profile;
+namespace content {
+class BrowserContext;
+}
namespace apps {
@@ -28,7 +30,7 @@ class AppRestoreService : public KeyedService,
// whether this new browser process launched due to a restart.
static bool ShouldRestoreApps(bool is_browser_restart);
- explicit AppRestoreService(Profile* profile);
+ explicit AppRestoreService(content::BrowserContext* context);
// Restart apps that need to be restarted and clear the "running" preference
// from apps to prevent them being restarted in subsequent restarts.
@@ -41,14 +43,18 @@ class AppRestoreService : public KeyedService,
// Called to notify that the application has begun to exit.
void OnApplicationTerminating();
- static AppRestoreService* Get(Profile* profile);
+ static AppRestoreService* Get(content::BrowserContext* context);
private:
// AppLifetimeMonitor::Observer.
- void OnAppStart(Profile* profile, const std::string& app_id) override;
- void OnAppActivated(Profile* profile, const std::string& app_id) override;
- void OnAppDeactivated(Profile* profile, const std::string& app_id) override;
- void OnAppStop(Profile* profile, const std::string& app_id) override;
+ void OnAppStart(content::BrowserContext* context,
+ const std::string& app_id) override;
+ void OnAppActivated(content::BrowserContext* context,
+ const std::string& app_id) override;
+ void OnAppDeactivated(content::BrowserContext* context,
+ const std::string& app_id) override;
+ void OnAppStop(content::BrowserContext* context,
+ const std::string& app_id) override;
// KeyedService.
void Shutdown() override;
@@ -62,7 +68,7 @@ class AppRestoreService : public KeyedService,
void StartObservingAppLifetime();
void StopObservingAppLifetime();
- Profile* profile_;
+ content::BrowserContext* context_;
DISALLOW_COPY_AND_ASSIGN(AppRestoreService);
};
« no previous file with comments | « apps/app_load_service_factory.cc ('k') | apps/app_restore_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698