Index: extensions/browser/api/declarative/declarative_api.cc |
diff --git a/extensions/browser/api/declarative/declarative_api.cc b/extensions/browser/api/declarative/declarative_api.cc |
index f88bbe8ce59dbb3669b6f1dadf95b0d67bace121..bb70fd88b882eaab4a7d57f9c3602e6fc192e91a 100644 |
--- a/extensions/browser/api/declarative/declarative_api.cc |
+++ b/extensions/browser/api/declarative/declarative_api.cc |
@@ -7,6 +7,7 @@ |
#include "base/base64.h" |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
+#include "base/single_thread_task_runner.h" |
#include "base/task_runner_util.h" |
#include "base/values.h" |
#include "content/public/browser/browser_thread.h" |
@@ -152,12 +153,11 @@ bool RulesFunction::RunAsync() { |
bool success = RunAsyncOnCorrectThread(); |
SendResponse(success); |
} else { |
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy = |
+ scoped_refptr<base::SingleThreadTaskRunner> thread_task_runner = |
content::BrowserThread::GetMessageLoopProxyForThread( |
rules_registry_->owner_thread()); |
base::PostTaskAndReplyWithResult( |
- message_loop_proxy.get(), |
- FROM_HERE, |
+ thread_task_runner.get(), FROM_HERE, |
base::Bind(&RulesFunction::RunAsyncOnCorrectThread, this), |
base::Bind(&RulesFunction::SendResponse, this)); |
} |