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

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

Issue 1719193003: Add a user id parameter to connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 months 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
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_params.h" 5 #include "mojo/shell/connect_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
11 namespace mojo { 11 namespace mojo {
12 namespace shell { 12 namespace shell {
13 13
14 ConnectParams::ConnectParams() {} 14 ConnectParams::ConnectParams() {}
15 15
16 ConnectParams::~ConnectParams() {} 16 ConnectParams::~ConnectParams() {}
17
18 void ConnectParams::SetSource(ApplicationInstance* source) {
19 if (!source) {
20 source_ = Identity();
21 return;
22 }
23
24 source_ = source->identity();
25 }
26 17
27 void ConnectParams::SetTargetURL(const GURL& target_url) { 18 void ConnectParams::SetTargetURL(const GURL& target_url) {
28 target_ = Identity(target_url, target_.qualifier(), target_.filter()); 19 target_ = Identity(target_url, target_.qualifier(),
20 mojom::Shell::kUserInherit, target_.filter());
29 } 21 }
30 22
31 } // namespace shell 23 } // namespace shell
32 } // namespace mojo 24 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/connect_params.h ('k') | mojo/shell/connect_util.h » ('j') | mojo/shell/identity.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698