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

Unified Diff: extensions/browser/api/declarative/declarative_api.cc

Issue 1120793007: [extensions] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Dependency over component module by removing file Created 5 years, 7 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 | « no previous file | extensions/browser/sandboxed_unpacker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « no previous file | extensions/browser/sandboxed_unpacker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698