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

Unified Diff: mojo/shell/tests/capability_filter_test.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/tests/capability_filter_test.h ('k') | mojo/shell/tests/package_test_package.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/tests/capability_filter_test.cc
diff --git a/mojo/shell/tests/capability_filter_test.cc b/mojo/shell/tests/capability_filter_test.cc
index 9bce8923500e3517b915437b0b220d4504897174..246ec9115385472f484bcb79cf9022b7a50f9cd8 100644
--- a/mojo/shell/tests/capability_filter_test.cc
+++ b/mojo/shell/tests/capability_filter_test.cc
@@ -115,7 +115,8 @@ class ServiceApplication : public ShellClient,
private:
// Overridden from ShellClient:
- void Initialize(Shell* shell, const std::string& url, uint32_t id) override {
+ void Initialize(Shell* shell, const std::string& url, uint32_t id,
+ uint32_t user_id) override {
shell_ = shell;
// ServiceApplications have no capability filter and can thus connect
// directly to the validator application.
@@ -162,7 +163,7 @@ TestApplication::TestApplication() : shell_(nullptr) {}
TestApplication::~TestApplication() {}
void TestApplication::Initialize(Shell* shell, const std::string& url,
- uint32_t id) {
+ uint32_t id, uint32_t user_id) {
shell_ = shell;
url_ = url;
}
@@ -327,7 +328,9 @@ void CapabilityFilterTest::RunApplication(const std::string& url,
shell::mojom::InterfaceProviderPtr local_interfaces;
new InterfaceProviderImpl(GetProxy(&local_interfaces), validator_);
scoped_ptr<ConnectParams> params(new ConnectParams);
- params->set_target(Identity(GURL(url), std::string(), filter));
+ params->set_source(CreateShellIdentity());
+ params->set_target(Identity(GURL(url), std::string(),
+ mojom::Shell::kUserInherit, filter));
params->set_remote_interfaces(GetProxy(&remote_interfaces));
params->set_local_interfaces(std::move(local_interfaces));
quit_identities_.insert(params->target());
« no previous file with comments | « mojo/shell/tests/capability_filter_test.h ('k') | mojo/shell/tests/package_test_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698