Chromium Code Reviews| Index: mojo/shell/connect_to_application_params.cc |
| diff --git a/mojo/shell/connect_to_application_params.cc b/mojo/shell/connect_to_application_params.cc |
| index f1f4f2605c45152ad01a723be9780317a8e7d678..963bb40b0eceb00827aa5b62aa22095fd64811f0 100644 |
| --- a/mojo/shell/connect_to_application_params.cc |
| +++ b/mojo/shell/connect_to_application_params.cc |
| @@ -13,27 +13,38 @@ ConnectToApplicationParams::ConnectToApplicationParams() {} |
| ConnectToApplicationParams::~ConnectToApplicationParams() {} |
| -void ConnectToApplicationParams::SetOriginatorInfo( |
| - ApplicationInstance* originator) { |
| - if (!originator) { |
| - originator_identity_ = Identity(); |
| - originator_filter_.clear(); |
| +void ConnectToApplicationParams::SetSource(ApplicationInstance* source) { |
| + if (!source) { |
| + source_ = Identity(); |
| return; |
| } |
| - originator_identity_ = originator->identity(); |
| - originator_filter_ = originator->filter(); |
| + source_ = source->identity(); |
| } |
| -void ConnectToApplicationParams::SetURLInfo(const GURL& app_url) { |
| - app_url_ = app_url; |
| - app_url_request_ = URLRequest::New(); |
| - app_url_request_->url = app_url_.spec(); |
| +void ConnectToApplicationParams::SetTarget(const Identity& target) { |
| + target_ = target; |
| + target_url_request_ = URLRequest::New(); |
| + target_url_request_->url = target_.url.spec(); |
| } |
| -void ConnectToApplicationParams::SetURLInfo(URLRequestPtr app_url_request) { |
| - app_url_request_ = app_url_request.Pass(); |
| - app_url_ = app_url_request_ ? GURL(app_url_request_->url) : GURL(); |
| +void ConnectToApplicationParams::SetTargetURL(const GURL& target_url) { |
|
yzshen1
2015/09/18 06:07:54
Related to my comment in identity.h: does it make
yzshen1
2015/09/18 15:44:09
Please ignore this comment. I somehow misread the
|
| + target_ = Identity(target_url, target_.qualifier, target_.filter()); |
| + target_url_request_ = URLRequest::New(); |
| + target_url_request_->url = target_.url.spec(); |
| +} |
| + |
| +void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request) { |
|
yzshen1
2015/09/18 06:07:54
It seems we have a few copies of target's contents
|
| + Identity target = request ? Identity(GURL(request->url), target_.qualifier, |
| + target_.filter()) |
| + : Identity(); |
| + SetTargetURLRequest(request.Pass(), target); |
| +} |
| + |
| +void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request, |
| + const Identity& target) { |
| + target_url_request_ = request.Pass(); |
| + target_ = target; |
| } |
| } // namespace shell |