| Index: chrome/browser/extensions/api/cast_channel/cast_channel_api.cc
|
| diff --git a/chrome/browser/extensions/api/cast_channel/cast_channel_api.cc b/chrome/browser/extensions/api/cast_channel/cast_channel_api.cc
|
| index ae2d98d85ff19b821112c6a706b1f2cc38b2e460..d1a84e4a31261a8f61178ce6c93e854619311df5 100644
|
| --- a/chrome/browser/extensions/api/cast_channel/cast_channel_api.cc
|
| +++ b/chrome/browser/extensions/api/cast_channel/cast_channel_api.cc
|
| @@ -280,8 +280,6 @@
|
| connect_info_.reset(new ConnectInfo);
|
| if (!ParseChannelUrl(GURL(cast_url), connect_info_.get())) {
|
| connect_info_.reset();
|
| - SetError("Invalid Cast URL " + cast_url);
|
| - return false;
|
| }
|
| break;
|
| case base::Value::TYPE_DICTIONARY:
|
| @@ -290,17 +288,12 @@
|
| default:
|
| break;
|
| }
|
| - if (!connect_info_.get()) {
|
| - SetError("Invalid connect_info");
|
| - return false;
|
| - }
|
| - channel_auth_ = connect_info_->auth;
|
| - ip_endpoint_.reset(ParseConnectInfo(*connect_info_));
|
| - if (!ip_endpoint_.get()) {
|
| - SetError("Invalid connect_info");
|
| - return false;
|
| - }
|
| - return true;
|
| + if (connect_info_.get()) {
|
| + channel_auth_ = connect_info_->auth;
|
| + ip_endpoint_.reset(ParseConnectInfo(*connect_info_));
|
| + return ip_endpoint_.get() != NULL;
|
| + }
|
| + return false;
|
| }
|
|
|
| void CastChannelOpenFunction::AsyncWorkStart() {
|
| @@ -326,26 +319,6 @@
|
| bool CastChannelSendFunction::Prepare() {
|
| params_ = Send::Params::Create(*args_);
|
| EXTENSION_FUNCTION_VALIDATE(params_.get());
|
| - if (params_->message.namespace_.empty()) {
|
| - SetError("message_info.namespace_ is required");
|
| - return false;
|
| - }
|
| - if (params_->message.source_id.empty()) {
|
| - SetError("message_info.source_id is required");
|
| - return false;
|
| - }
|
| - if (params_->message.destination_id.empty()) {
|
| - SetError("message_info.destination_id is required");
|
| - return false;
|
| - }
|
| - switch (params_->message.data->GetType()) {
|
| - case base::Value::TYPE_STRING:
|
| - case base::Value::TYPE_BINARY:
|
| - break;
|
| - default:
|
| - SetError("Invalid type of message_info.data");
|
| - return false;
|
| - }
|
| return true;
|
| }
|
|
|
|
|