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

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

Issue 1687693002: Rename ConnectToService to ConnectToInterface() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sp2
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
« no previous file with comments | « mojo/shell/application_package_apptest.cc ('k') | mojo/shell/public/cpp/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/capability_filter_test.h" 5 #include "mojo/shell/capability_filter_test.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 public: 113 public:
114 ServiceApplication() : shell_(nullptr) {} 114 ServiceApplication() : shell_(nullptr) {}
115 ~ServiceApplication() override {} 115 ~ServiceApplication() override {}
116 116
117 private: 117 private:
118 // Overridden from ShellClient: 118 // Overridden from ShellClient:
119 void Initialize(Shell* shell, const std::string& url, uint32_t id) override { 119 void Initialize(Shell* shell, const std::string& url, uint32_t id) override {
120 shell_ = shell; 120 shell_ = shell;
121 // ServiceApplications have no capability filter and can thus connect 121 // ServiceApplications have no capability filter and can thus connect
122 // directly to the validator application. 122 // directly to the validator application.
123 shell_->ConnectToService("test:validator", &validator_); 123 shell_->ConnectToInterface("test:validator", &validator_);
124 } 124 }
125 bool AcceptConnection(Connection* connection) override { 125 bool AcceptConnection(Connection* connection) override {
126 AddInterface<Safe>(connection); 126 AddInterface<Safe>(connection);
127 AddInterface<Unsafe>(connection); 127 AddInterface<Unsafe>(connection);
128 return true; 128 return true;
129 } 129 }
130 130
131 // Overridden from InterfaceFactory<Safe>: 131 // Overridden from InterfaceFactory<Safe>:
132 void Create(Connection* connection, 132 void Create(Connection* connection,
133 InterfaceRequest<Safe> request) override { 133 InterfaceRequest<Safe> request) override {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 void CapabilityFilterTest::RunTest() { 344 void CapabilityFilterTest::RunTest() {
345 loop()->Run(); 345 loop()->Run();
346 EXPECT_TRUE(validator_->expectations_met()); 346 EXPECT_TRUE(validator_->expectations_met());
347 if (!validator_->expectations_met()) 347 if (!validator_->expectations_met())
348 validator_->PrintUnmetExpectations(); 348 validator_->PrintUnmetExpectations();
349 } 349 }
350 350
351 } // namespace test 351 } // namespace test
352 } // namespace shell 352 } // namespace shell
353 } // namespace mojo 353 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/application_package_apptest.cc ('k') | mojo/shell/public/cpp/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698