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

Unified Diff: chrome/browser/extensions/api/automation_internal/automation_internal_api.cc

Issue 307983002: Use new ExtensionFunction::Error(..) error syntax in automation internal API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/automation_internal/automation_internal_api.cc
diff --git a/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc b/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc
index c6caaaf9fcd0e3331ec8fb23fed0459e427bc370..d84c21b58e6cfda4461077b85c2f9982f25465e7 100644
--- a/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc
+++ b/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc
@@ -19,7 +19,6 @@
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "extensions/common/error_utils.h"
#include "extensions/common/permissions/permissions_data.h"
#if defined(OS_CHROMEOS)
@@ -142,8 +141,8 @@ AutomationInternalEnableCurrentTabFunction::Run() {
return RespondNow(Error("Could not enable accessibility for active tab"));
if (!CanRequestAutomation(GetExtension(), automation_info, contents)) {
- return RespondNow(Error(ErrorUtils::FormatErrorMessage(
- kCannotRequestAutomationOnPage, contents->GetURL().spec())));
+ return RespondNow(
+ Error(kCannotRequestAutomationOnPage, contents->GetURL().spec()));
}
AutomationWebContentsObserver::CreateForWebContents(contents);
rwh->EnableTreeOnlyAccessibilityMode();
@@ -182,8 +181,8 @@ AutomationInternalPerformActionFunction::Run() {
const content::WebContents* contents =
content::WebContents::FromRenderViewHost(rvh);
if (!CanRequestAutomation(GetExtension(), automation_info, contents)) {
- return RespondNow(Error(ErrorUtils::FormatErrorMessage(
- kCannotRequestAutomationOnPage, contents->GetURL().spec())));
+ return RespondNow(
+ Error(kCannotRequestAutomationOnPage, contents->GetURL().spec()));
}
}
RenderWidgetHostActionAdapter adapter(rwh);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698