Index: chrome/browser/extensions/api/system_info/system_info_api.cc |
diff --git a/chrome/browser/extensions/api/system_info/system_info_api.cc b/chrome/browser/extensions/api/system_info/system_info_api.cc |
index 90bde75c2bc3cd7ac8e3779554e6601325071c39..25a79d5f49044ae8df17b7e64f197501122caa2c 100644 |
--- a/chrome/browser/extensions/api/system_info/system_info_api.cc |
+++ b/chrome/browser/extensions/api/system_info/system_info_api.cc |
@@ -222,8 +222,9 @@ ProfileKeyedAPIFactory<SystemInfoAPI>* SystemInfoAPI::GetFactoryInstance() { |
return g_factory.Pointer(); |
} |
-SystemInfoAPI::SystemInfoAPI(Profile* profile) : profile_(profile) { |
- EventRouter* router = ExtensionSystem::Get(profile_)->event_router(); |
+SystemInfoAPI::SystemInfoAPI(content::BrowserContext* context) |
+ : browser_context_(context) { |
+ EventRouter* router = ExtensionSystem::Get(browser_context_)->event_router(); |
router->RegisterObserver(this, system_storage::OnAttached::kEventName); |
router->RegisterObserver(this, system_storage::OnDetached::kEventName); |
router->RegisterObserver(this, system_display::OnDisplayChanged::kEventName); |
@@ -233,7 +234,8 @@ SystemInfoAPI::~SystemInfoAPI() { |
} |
void SystemInfoAPI::Shutdown() { |
- ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); |
+ ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver( |
+ this); |
} |
void SystemInfoAPI::OnListenerAdded(const EventListenerInfo& details) { |