Index: chrome/browser/extensions/api/idle/idle_api.cc |
diff --git a/chrome/browser/extensions/api/idle/idle_api.cc b/chrome/browser/extensions/api/idle/idle_api.cc |
index a80d0cf432a9dfd33182677ef5dbcc2f16911498..5bbbacd301c8a8ea1651b3da3a76da71facdc88e 100644 |
--- a/chrome/browser/extensions/api/idle/idle_api.cc |
+++ b/chrome/browser/extensions/api/idle/idle_api.cc |
@@ -35,7 +35,7 @@ bool IdleQueryStateFunction::RunAsync() { |
EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &threshold)); |
threshold = ClampThreshold(threshold); |
- IdleManagerFactory::GetForProfile(GetProfile())->QueryState( |
+ IdleManagerFactory::GetForBrowserContext(context_)->QueryState( |
threshold, base::Bind(&IdleQueryStateFunction::IdleStateCallback, this)); |
// Don't send the response, it'll be sent by our callback |
@@ -52,7 +52,7 @@ bool IdleSetDetectionIntervalFunction::RunSync() { |
EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &threshold)); |
threshold = ClampThreshold(threshold); |
- IdleManagerFactory::GetForProfile(GetProfile()) |
+ IdleManagerFactory::GetForBrowserContext(context_) |
->SetThreshold(extension_id(), threshold); |
return true; |