OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "mojo/shell/connect_to_application_params.h" | 5 #include "mojo/shell/connect_to_application_params.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "mojo/shell/application_instance.h" | 9 #include "mojo/shell/application_instance.h" |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 target_url_request_->url = target_.url().spec(); | 30 target_url_request_->url = target_.url().spec(); |
31 } | 31 } |
32 | 32 |
33 void ConnectToApplicationParams::SetTargetURL(const GURL& target_url) { | 33 void ConnectToApplicationParams::SetTargetURL(const GURL& target_url) { |
34 target_ = Identity(target_url, target_.qualifier(), target_.filter()); | 34 target_ = Identity(target_url, target_.qualifier(), target_.filter()); |
35 target_url_request_ = URLRequest::New(); | 35 target_url_request_ = URLRequest::New(); |
36 target_url_request_->url = target_.url().spec(); | 36 target_url_request_->url = target_.url().spec(); |
37 } | 37 } |
38 | 38 |
39 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request) { | 39 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request) { |
40 Identity target = request ? Identity(GURL(request->url), target_.qualifier(), | 40 Identity target = request ? Identity(GURL(request->url.get()), |
41 target_.filter()) | 41 target_.qualifier(), target_.filter()) |
42 : Identity(); | 42 : Identity(); |
43 SetTargetURLRequest(std::move(request), target); | 43 SetTargetURLRequest(std::move(request), target); |
44 } | 44 } |
45 | 45 |
46 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request, | 46 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request, |
47 const Identity& target) { | 47 const Identity& target) { |
48 target_url_request_ = std::move(request); | 48 target_url_request_ = std::move(request); |
49 target_ = target; | 49 target_ = target; |
50 } | 50 } |
51 | 51 |
52 } // namespace shell | 52 } // namespace shell |
53 } // namespace mojo | 53 } // namespace mojo |
OLD | NEW |