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

Unified Diff: chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm

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/saved_files_service_factory.cc ('k') | chrome/browser/apps/app_shim/extension_app_shim_handler_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm
diff --git a/chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm b/chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm
index 6575b6d60aa3113fc2191a8556d02b0d627d7200..ea990bd9367ec7e31e32d3bde86d3b714c26a4fd 100644
--- a/chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm
+++ b/chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm
@@ -178,10 +178,11 @@ class AppLifetimeMonitorObserver : public apps::AppLifetimeMonitor::Observer {
public:
AppLifetimeMonitorObserver(Profile* profile)
: profile_(profile), activated_count_(0), deactivated_count_(0) {
- apps::AppLifetimeMonitorFactory::GetForProfile(profile_)->AddObserver(this);
+ apps::AppLifetimeMonitorFactory::GetForBrowserContext(profile_)
+ ->AddObserver(this);
}
~AppLifetimeMonitorObserver() override {
- apps::AppLifetimeMonitorFactory::GetForProfile(profile_)
+ apps::AppLifetimeMonitorFactory::GetForBrowserContext(profile_)
->RemoveObserver(this);
}
@@ -190,10 +191,12 @@ class AppLifetimeMonitorObserver : public apps::AppLifetimeMonitor::Observer {
protected:
// AppLifetimeMonitor::Observer overrides:
- void OnAppActivated(Profile* profile, const std::string& app_id) override {
+ void OnAppActivated(content::BrowserContext* context,
+ const std::string& app_id) override {
++activated_count_;
}
- void OnAppDeactivated(Profile* profile, const std::string& app_id) override {
+ void OnAppDeactivated(content::BrowserContext* context,
+ const std::string& app_id) override {
++deactivated_count_;
}
« no previous file with comments | « apps/saved_files_service_factory.cc ('k') | chrome/browser/apps/app_shim/extension_app_shim_handler_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698