| Index: chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
|
| diff --git a/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc b/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
|
| index 367bdfb835026065675c05461a78de1f3363c283..700aa8820c9ce70a95678f15e7e578a5652bcb90 100644
|
| --- a/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
|
| +++ b/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
|
| @@ -26,11 +26,6 @@
|
| #include "chrome/browser/chromeos/web_socket_proxy_controller.h"
|
| #endif
|
|
|
| -namespace {
|
| -const char kPermissionDeniedError[] =
|
| - "Extension does not have permission to use this method.";
|
| -}
|
| -
|
| WebSocketProxyPrivate::WebSocketProxyPrivate()
|
| : port_(-1),
|
| listening_port_(-1),
|
| @@ -106,24 +101,16 @@ bool WebSocketProxyPrivate::RunImpl() {
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &hostname_));
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(1, &port_));
|
|
|
| - if (chromeos::WebSocketProxyController::CheckCredentials(
|
| - extension_id(), hostname_, port_,
|
| - do_tls_ ? chromeos::WebSocketProxyController::TLS_OVER_TCP :
|
| - chromeos::WebSocketProxyController::PLAIN_TCP)) {
|
| - listening_port_ = chromeos::WebSocketProxyController::GetPort();
|
| - if (listening_port_ < 1) {
|
| - delay_response = true;
|
| - registrar_.Add(
|
| - this, chrome::NOTIFICATION_WEB_SOCKET_PROXY_STARTED,
|
| - content::NotificationService::AllSources());
|
| - }
|
| - map_["hostname"] = hostname_;
|
| - map_["port"] = base::IntToString(port_);
|
| - map_["extension_id"] = extension_id();
|
| - } else {
|
| - error_ = kPermissionDeniedError;
|
| - return false;
|
| + listening_port_ = chromeos::WebSocketProxyController::GetPort();
|
| + if (listening_port_ < 1) {
|
| + delay_response = true;
|
| + registrar_.Add(
|
| + this, chrome::NOTIFICATION_WEB_SOCKET_PROXY_STARTED,
|
| + content::NotificationService::AllSources());
|
| }
|
| + map_["hostname"] = hostname_;
|
| + map_["port"] = base::IntToString(port_);
|
| + map_["extension_id"] = extension_id();
|
|
|
| if (delay_response) {
|
| const int kTimeout = 12;
|
|
|