| Index: extensions/browser/extension_function.cc
|
| diff --git a/extensions/browser/extension_function.cc b/extensions/browser/extension_function.cc
|
| index 372005571e4d4e372a045ac900adcf18fab5b06c..7d0920534ec7a920258815bf3ceda1b90038d943 100644
|
| --- a/extensions/browser/extension_function.cc
|
| +++ b/extensions/browser/extension_function.cc
|
| @@ -13,12 +13,14 @@
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "extensions/browser/extension_function_dispatcher.h"
|
| #include "extensions/browser/extension_message_filter.h"
|
| +#include "extensions/common/error_utils.h"
|
| #include "extensions/common/extension_api.h"
|
| #include "extensions/common/extension_messages.h"
|
|
|
| using content::BrowserThread;
|
| using content::RenderViewHost;
|
| using content::WebContents;
|
| +using extensions::ErrorUtils;
|
| using extensions::ExtensionAPI;
|
| using extensions::Feature;
|
|
|
| @@ -255,6 +257,30 @@ ExtensionFunction::ResponseValue ExtensionFunction::Error(
|
| return ResponseValue(new ErrorResponseValue(this, error));
|
| }
|
|
|
| +ExtensionFunction::ResponseValue ExtensionFunction::Error(
|
| + const std::string& format,
|
| + const std::string& s1) {
|
| + return ResponseValue(
|
| + new ErrorResponseValue(this, ErrorUtils::FormatErrorMessage(format, s1)));
|
| +}
|
| +
|
| +ExtensionFunction::ResponseValue ExtensionFunction::Error(
|
| + const std::string& format,
|
| + const std::string& s1,
|
| + const std::string& s2) {
|
| + return ResponseValue(new ErrorResponseValue(
|
| + this, ErrorUtils::FormatErrorMessage(format, s1, s2)));
|
| +}
|
| +
|
| +ExtensionFunction::ResponseValue ExtensionFunction::Error(
|
| + const std::string& format,
|
| + const std::string& s1,
|
| + const std::string& s2,
|
| + const std::string& s3) {
|
| + return ResponseValue(new ErrorResponseValue(
|
| + this, ErrorUtils::FormatErrorMessage(format, s1, s2, s3)));
|
| +}
|
| +
|
| ExtensionFunction::ResponseValue ExtensionFunction::BadMessage() {
|
| return ResponseValue(new BadMessageResponseValue(this));
|
| }
|
|
|