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

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

Issue 1307273004: Group ConnectToApplication-related info into a params struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync & rebase Created 5 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "mojo/shell/connect_to_application_params.h"
6
7 #include "mojo/shell/application_instance.h"
8
9 namespace mojo {
10 namespace shell {
11
12 ConnectToApplicationParams::ConnectToApplicationParams() {}
13
14 void ConnectToApplicationParams::SetOriginatorInfo(
15 ApplicationInstance* originator) {
16 if (!originator) {
17 originator_identity_ = Identity();
18 originator_filter_.clear();
19 return;
20 }
21
22 originator_identity_ = originator->identity();
23 originator_filter_ = originator->filter();
24 }
25
26 void ConnectToApplicationParams::SetURLInfo(const GURL& app_url) {
27 app_url_ = app_url;
28 app_url_request_ = URLRequest::New();
29 app_url_request_->url = app_url_.spec();
30 }
31
32 void ConnectToApplicationParams::SetURLInfo(URLRequestPtr app_url_request) {
33 app_url_request_ = app_url_request.Pass();
34 app_url_ = app_url_request_ ? GURL(app_url_request_->url) : GURL();
35 }
36
37 } // namespace shell
38 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698