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

Unified Diff: shell/application_manager/application_manager_unittest.cc

Issue 1979723002: ApplicationConnection devolution, part 3. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 | « shell/android/native_viewport_application_loader.cc ('k') | shell/test/pingable_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/application_manager/application_manager_unittest.cc
diff --git a/shell/application_manager/application_manager_unittest.cc b/shell/application_manager/application_manager_unittest.cc
index c8c677e1ec94cdd292c1c40cfac36d605c38829c..0337e85ae558604e54a59f592b14dd446c82ecc3 100644
--- a/shell/application_manager/application_manager_unittest.cc
+++ b/shell/application_manager/application_manager_unittest.cc
@@ -121,8 +121,9 @@ class TestApplicationLoader : public ApplicationLoader,
}
// ApplicationDelegate implementation.
- bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
- connection->GetServiceProviderImpl().AddService<TestService>(
+ bool ConfigureIncomingConnection(
+ mojo::ServiceProviderImpl* service_provider_impl) override {
+ service_provider_impl->AddService<TestService>(
[this](const ConnectionContext& connection_context,
InterfaceRequest<TestService> request) {
new TestServiceImpl(context_, request.Pass());
@@ -305,9 +306,10 @@ class Tester : public ApplicationDelegate, public ApplicationLoader {
app_.reset(new ApplicationImpl(this, application_request.Pass()));
}
- bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
+ bool ConfigureIncomingConnection(
+ mojo::ServiceProviderImpl* service_provider_impl) override {
const std::string& remote_url =
- connection->GetServiceProviderImpl().connection_context().remote_url;
+ service_provider_impl->connection_context().remote_url;
if (!requestor_url_.empty() && requestor_url_ != remote_url) {
context_->set_tester_called_quit();
context_->QuitSoon();
@@ -316,13 +318,13 @@ class Tester : public ApplicationDelegate, public ApplicationLoader {
}
// If we're coming from A, then add B, otherwise A.
if (remote_url == kTestAURLString) {
- connection->GetServiceProviderImpl().AddService<TestB>(
+ service_provider_impl->AddService<TestB>(
[this](const ConnectionContext& connection_context,
InterfaceRequest<TestB> test_b_request) {
new TestBImpl(context_, test_b_request.Pass());
});
} else {
- connection->GetServiceProviderImpl().AddService<TestA>(
+ service_provider_impl->AddService<TestA>(
[this](const ConnectionContext& connection_context,
InterfaceRequest<TestA> test_a_request) {
mojo::InterfaceHandle<mojo::ServiceProvider> incoming_sp_handle;
@@ -376,7 +378,8 @@ class TestExternal : public ApplicationDelegate {
base::MessageLoop::current()->Quit();
}
- bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
+ bool ConfigureIncomingConnection(
+ mojo::ServiceProviderImpl* service_provider_impl) override {
configure_incoming_connection_called_ = true;
base::MessageLoop::current()->Quit();
return true;
« no previous file with comments | « shell/android/native_viewport_application_loader.cc ('k') | shell/test/pingable_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698