Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: mojo/shell/connect_to_application_params.cc

Issue 1538823002: Convert Pass()→std::move() in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/shell/connect_to_application_params.h ('k') | mojo/shell/connect_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
8
7 #include "mojo/shell/application_instance.h" 9 #include "mojo/shell/application_instance.h"
8 10
9 namespace mojo { 11 namespace mojo {
10 namespace shell { 12 namespace shell {
11 13
12 ConnectToApplicationParams::ConnectToApplicationParams() {} 14 ConnectToApplicationParams::ConnectToApplicationParams() {}
13 15
14 ConnectToApplicationParams::~ConnectToApplicationParams() {} 16 ConnectToApplicationParams::~ConnectToApplicationParams() {}
15 17
16 void ConnectToApplicationParams::SetSource(ApplicationInstance* source) { 18 void ConnectToApplicationParams::SetSource(ApplicationInstance* source) {
(...skipping 14 matching lines...) Expand all
31 void ConnectToApplicationParams::SetTargetURL(const GURL& target_url) { 33 void ConnectToApplicationParams::SetTargetURL(const GURL& target_url) {
32 target_ = Identity(target_url, target_.qualifier(), target_.filter()); 34 target_ = Identity(target_url, target_.qualifier(), target_.filter());
33 target_url_request_ = URLRequest::New(); 35 target_url_request_ = URLRequest::New();
34 target_url_request_->url = target_.url().spec(); 36 target_url_request_->url = target_.url().spec();
35 } 37 }
36 38
37 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request) { 39 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request) {
38 Identity target = request ? Identity(GURL(request->url), target_.qualifier(), 40 Identity target = request ? Identity(GURL(request->url), target_.qualifier(),
39 target_.filter()) 41 target_.filter())
40 : Identity(); 42 : Identity();
41 SetTargetURLRequest(request.Pass(), target); 43 SetTargetURLRequest(std::move(request), target);
42 } 44 }
43 45
44 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request, 46 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request,
45 const Identity& target) { 47 const Identity& target) {
46 target_url_request_ = request.Pass(); 48 target_url_request_ = std::move(request);
47 target_ = target; 49 target_ = target;
48 } 50 }
49 51
50 } // namespace shell 52 } // namespace shell
51 } // namespace mojo 53 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/connect_to_application_params.h ('k') | mojo/shell/connect_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698