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

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: 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
« no previous file with comments | « mojo/shell/connect_to_application_params.h ('k') | mojo/shell/content_handler_connection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ConnectToApplicationParams::~ConnectToApplicationParams() {}
15
16 void ConnectToApplicationParams::SetOriginatorInfo(
17 ApplicationInstance* originator) {
18 if (!originator) {
19 originator_identity_ = Identity();
20 originator_filter_.clear();
21 return;
22 }
23
24 originator_identity_ = originator->identity();
25 originator_filter_ = originator->filter();
26 }
27
28 void ConnectToApplicationParams::SetURLInfo(const GURL& app_url) {
29 app_url_ = app_url;
30 app_url_request_ = URLRequest::New();
31 app_url_request_->url = app_url_.spec();
32 }
33
34 void ConnectToApplicationParams::SetURLInfo(URLRequestPtr app_url_request) {
35 app_url_request_ = app_url_request.Pass();
36 app_url_ = app_url_request_ ? GURL(app_url_request_->url) : GURL();
37 }
38
39 } // namespace shell
40 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/connect_to_application_params.h ('k') | mojo/shell/content_handler_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698