#include "base/task_runner_util.h"
#include "base/values.h"
#include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
-#include "chrome/browser/guestview/webview/webview_guest.h"
+#include "chrome/browser/guest_view/web_view/web_view_guest.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/events.h"
#include "content/public/browser/browser_thread.h"
return availability.is_available();
}
-bool RulesFunction::RunImpl() {
+bool RulesFunction::RunAsync() {
std::string event_name;
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &event_name));
EXTENSION_FUNCTION_VALIDATE(rules_registry_.get());
if (content::BrowserThread::CurrentlyOn(rules_registry_->owner_thread())) {
- bool success = RunImplOnCorrectThread();
+ bool success = RunAsyncOnCorrectThread();
SendResponse(success);
} else {
scoped_refptr<base::MessageLoopProxy> message_loop_proxy =
base::PostTaskAndReplyWithResult(
message_loop_proxy.get(),
FROM_HERE,
- base::Bind(&RulesFunction::RunImplOnCorrectThread, this),
+ base::Bind(&RulesFunction::RunAsyncOnCorrectThread, this),
base::Bind(&RulesFunction::SendResponse, this));
}
return true;
}
-bool EventsEventAddRulesFunction::RunImplOnCorrectThread() {
+bool EventsEventAddRulesFunction::RunAsyncOnCorrectThread() {
scoped_ptr<AddRules::Params> params(AddRules::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
return error_.empty();
}
-bool EventsEventRemoveRulesFunction::RunImplOnCorrectThread() {
+bool EventsEventRemoveRulesFunction::RunAsyncOnCorrectThread() {
scoped_ptr<RemoveRules::Params> params(RemoveRules::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
return error_.empty();
}
-bool EventsEventGetRulesFunction::RunImplOnCorrectThread() {
+bool EventsEventGetRulesFunction::RunAsyncOnCorrectThread() {
scoped_ptr<GetRules::Params> params(GetRules::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());