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

Unified Diff: chrome/browser/extensions/api/idle/idle_api.cc

Issue 826933003: Update idle extension API to use BrowserContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make BrowserContext members const Created 5 years, 11 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
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;

Powered by Google App Engine
This is Rietveld 408576698