| Index: chrome/browser/extensions/extension_chrome_auth_private_api.cc
|
| diff --git a/chrome/browser/extensions/extension_chrome_auth_private_api.cc b/chrome/browser/extensions/extension_chrome_auth_private_api.cc
|
| index 1f4e6db5fae268be6773dd74a65d8c476f289ec4..5a9a54d0df06cd2cf0ad2eb5fb86330cce656e50 100644
|
| --- a/chrome/browser/extensions/extension_chrome_auth_private_api.cc
|
| +++ b/chrome/browser/extensions/extension_chrome_auth_private_api.cc
|
| @@ -13,24 +13,8 @@
|
|
|
| namespace {
|
|
|
| -bool IsCloudPrintEnableURL(Profile* profile, const GURL& url) {
|
| - ExtensionService* service = profile->GetExtensionService();
|
| - const Extension* cloud_print_app = service->GetExtensionById(
|
| - extension_misc::kCloudPrintAppId, false);
|
| - if (!cloud_print_app) {
|
| -#if !defined(OS_CHROMEOS)
|
| - NOTREACHED();
|
| -#endif // !defined(OS_CHROMEOS)
|
| - return false;
|
| - }
|
| - return (service->extensions()->GetHostedAppByURL(ExtensionURLInfo(url)) ==
|
| - cloud_print_app);
|
| -}
|
| -
|
| bool test_mode = false;
|
|
|
| -const char kAccessDeniedError[] =
|
| - "Cannot call this API from a non-cloudprint URL.";
|
| } // namespace
|
|
|
| SetCloudPrintCredentialsFunction::SetCloudPrintCredentialsFunction() {
|
| @@ -40,12 +24,6 @@ SetCloudPrintCredentialsFunction::~SetCloudPrintCredentialsFunction() {
|
| }
|
|
|
| bool SetCloudPrintCredentialsFunction::RunImpl() {
|
| - // This has to be called from the specific cloud print app.
|
| - if (!IsCloudPrintEnableURL(profile_, source_url())) {
|
| - error_ = kAccessDeniedError;
|
| - return false;
|
| - }
|
| -
|
| std::string user_email;
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &user_email));
|
| std::string robot_email;
|
|
|