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

Unified Diff: mojo/shell/connect_to_application_params.h

Issue 1354003002: Make CapabilityFilter be part of Identity (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/capability_filter_unittest.cc ('k') | mojo/shell/connect_to_application_params.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/connect_to_application_params.h
diff --git a/mojo/shell/connect_to_application_params.h b/mojo/shell/connect_to_application_params.h
index 13268f710a6b705a5cd307a96033efd71aa356fc..badca064e3368f31676575eece71a5ca79cde106 100644
--- a/mojo/shell/connect_to_application_params.h
+++ b/mojo/shell/connect_to_application_params.h
@@ -12,7 +12,6 @@
#include "mojo/application/public/interfaces/shell.mojom.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/services/network/public/interfaces/url_loader.mojom.h"
-#include "mojo/shell/capability_filter.h"
#include "mojo/shell/identity.h"
#include "url/gurl.h"
@@ -28,35 +27,24 @@ class ConnectToApplicationParams {
ConnectToApplicationParams();
~ConnectToApplicationParams();
- // Sets both |originator_identity_| and |originator_filter_|. If |originator|
- // is null, both fields are reset.
- void SetOriginatorInfo(ApplicationInstance* originator);
+ // Sets |source_|. If |source| is null, |source_| is reset.
+ void SetSource(ApplicationInstance* source);
- // Sets both |app_url_| and |app_url_request_|.
- void SetURLInfo(const GURL& app_url);
- // Sets both |app_url_| and |app_url_request_|.
- void SetURLInfo(URLRequestPtr app_url_request);
+ // The following methods set both |target_| and |target_url_request_|.
+ void SetTarget(const Identity& target);
+ void SetTargetURL(const GURL& target_url);
+ void SetTargetURLRequest(URLRequestPtr request);
+ void SetTargetURLRequest(URLRequestPtr request, const Identity& target);
- void set_originator_identity(const Identity& value) {
- originator_identity_ = value;
- }
- const Identity& originator_identity() const { return originator_identity_; }
+ void set_source(const Identity& source) { source_ = source; }
+ const Identity& source() const { return source_; }
+ const Identity& target() const { return target_; }
- void set_originator_filter(const CapabilityFilter& value) {
- originator_filter_ = value;
- }
- const CapabilityFilter& originator_filter() const {
- return originator_filter_;
+ const URLRequest* target_url_request() const {
+ return target_url_request_.get();
}
-
- const GURL& app_url() const { return app_url_; }
-
- const URLRequest* app_url_request() const { return app_url_request_.get(); }
- // NOTE: This doesn't reset |app_url_|.
- URLRequestPtr TakeAppURLRequest() { return app_url_request_.Pass(); }
-
- void set_qualifier(const std::string& value) { qualifier_ = value; }
- const std::string& qualifier() const { return qualifier_; }
+ // NOTE: This doesn't reset |target_|.
+ URLRequestPtr TakeTargetURLRequest() { return target_url_request_.Pass(); }
void set_services(InterfaceRequest<ServiceProvider> value) {
services_ = value.Pass();
@@ -68,9 +56,6 @@ class ConnectToApplicationParams {
}
ServiceProviderPtr TakeExposedServices() { return exposed_services_.Pass(); }
- void set_filter(const CapabilityFilter& value) { filter_ = value; }
- const CapabilityFilter& filter() const { return filter_; }
-
void set_on_application_end(const base::Closure& value) {
on_application_end_ = value;
}
@@ -87,21 +72,17 @@ class ConnectToApplicationParams {
private:
// It may be null (i.e., is_null() returns true) which indicates that there is
- // no originator (e.g., for the first application or in tests).
- Identity originator_identity_;
- // Should be ignored if |originator_identity_| is null.
- CapabilityFilter originator_filter_;
- // The URL of the application that is being connected to.
- GURL app_url_;
+ // no source (e.g., for the first application or in tests).
+ Identity source_;
+ // The identity of the application being connected to.
+ Identity target_;
// The URL request to fetch the application. It may contain more information
- // than |app_url_| (e.g., headers, request body). When it is taken, |app_url_|
+ // than |target_| (e.g., headers, request body). When it is taken, |target_|
// remains unchanged.
- URLRequestPtr app_url_request_;
- // Please see the comments in identity.h for the exact meaning of qualifier.
- std::string qualifier_;
+ URLRequestPtr target_url_request_;
+
InterfaceRequest<ServiceProvider> services_;
ServiceProviderPtr exposed_services_;
- CapabilityFilter filter_;
base::Closure on_application_end_;
Shell::ConnectToApplicationCallback connect_callback_;
« no previous file with comments | « mojo/shell/capability_filter_unittest.cc ('k') | mojo/shell/connect_to_application_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698