Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated.
I.e., rename them to ConnectTo{Application,Service}Deprecated() (which
will at least be easier/more reliable to grep for).
* ApplicationImpl::ConnectToService() can/should nearly always be
replaced with a use of mojo::ConnectToService() from connect.h. (The
ApplicationImpl::ConnectToService() is unusually inefficient for what
it's used for.)
* ApplicationImpl::ConnectToApplication() is used by
ApplicationImpl::ConnectToService() (accounting for the latter's gross
inefficiency), and sometimes semi-legitimately to connect to *and*
provide services to, e.g., the tracing service. It has the side-effect
of keeping connections alive, but maybe that should just be done
"manually" instead; such uses can be replaced with
shell()->ConnectToApplication() (and manual lifetime management), or
maybe by making mojo::ConnectToService() slightly more general. (There
are also a few dubious-looking uses, to be investigated.)
For now, I've just renamed them. I plan to fix the actual call sites (in
the ways indicated above) more incrementally.
R=vardhan@google.com
Review URL: https://codereview.chromium.org/1916233002 .
diff --git a/apps/benchmark/benchmark_app.cc b/apps/benchmark/benchmark_app.cc
index 3f5c364..29eb4b3 100644
--- a/apps/benchmark/benchmark_app.cc
+++ b/apps/benchmark/benchmark_app.cc
@@ -55,7 +55,7 @@
// Connect to trace collector, which will fetch the trace events produced by
// the app being benchmarked.
tracing::TraceCollectorPtr trace_collector;
- app->ConnectToService("mojo:tracing", &trace_collector);
+ app->ConnectToServiceDeprecated("mojo:tracing", &trace_collector);
trace_collector_client_.reset(
new TraceCollectorClient(this, trace_collector.Pass()));
trace_collector_client_->Start(categories_str);
@@ -85,7 +85,7 @@
// Record the time origin for measurements just before connecting to the app
// being benchmarked.
time_origin_ = base::TimeTicks::FromInternalValue(MojoGetTimeTicksNow());
- traced_app_connection_ = app->ConnectToApplication(args_.app);
+ traced_app_connection_ = app->ConnectToApplicationDeprecated(args_.app);
// Post task to stop tracing when the time is up.
base::MessageLoop::current()->PostDelayedTask(
diff --git a/examples/apptest/example_apptest.cc b/examples/apptest/example_apptest.cc
index 3b760c5..13e1658 100644
--- a/examples/apptest/example_apptest.cc
+++ b/examples/apptest/example_apptest.cc
@@ -23,8 +23,8 @@
void SetUp() override {
ApplicationTestBase::SetUp();
- application_impl()->ConnectToService("mojo:example_service",
- &example_service_);
+ application_impl()->ConnectToServiceDeprecated("mojo:example_service",
+ &example_service_);
}
ExampleServicePtr example_service_;
diff --git a/examples/audio_play_test/play_tone.cc b/examples/audio_play_test/play_tone.cc
index ff12890..f091fae 100644
--- a/examples/audio_play_test/play_tone.cc
+++ b/examples/audio_play_test/play_tone.cc
@@ -70,7 +70,7 @@
}
void PlayToneApp::Initialize(ApplicationImpl* app) {
- app->ConnectToService("mojo:audio_server", &audio_server_);
+ app->ConnectToServiceDeprecated("mojo:audio_server", &audio_server_);
audio_server_.set_connection_error_handler([this]() {
OnConnectionError("audio_server");
});
diff --git a/examples/audio_play_test/play_wav.cc b/examples/audio_play_test/play_wav.cc
index b11f31f..581e482 100644
--- a/examples/audio_play_test/play_wav.cc
+++ b/examples/audio_play_test/play_wav.cc
@@ -157,12 +157,12 @@
});
void PlayWAVApp::Initialize(ApplicationImpl* app) {
- app->ConnectToService("mojo:audio_server", &audio_server_);
+ app->ConnectToServiceDeprecated("mojo:audio_server", &audio_server_);
audio_server_.set_connection_error_handler([this]() {
OnConnectionError("audio_server");
});
- app->ConnectToService("mojo:network_service", &network_service_);
+ app->ConnectToServiceDeprecated("mojo:network_service", &network_service_);
audio_server_.set_connection_error_handler([this]() {
OnConnectionError("network_service");
});
diff --git a/examples/authentication_demo/google_authentication_demo.cc b/examples/authentication_demo/google_authentication_demo.cc
index e3a1869..38caaf2 100644
--- a/examples/authentication_demo/google_authentication_demo.cc
+++ b/examples/authentication_demo/google_authentication_demo.cc
@@ -23,7 +23,8 @@
void Initialize(mojo::ApplicationImpl* app) override {
DLOG(INFO) << "Connecting to authentication service...";
- app->ConnectToService("mojo:authentication", &authentication_service_);
+ app->ConnectToServiceDeprecated("mojo:authentication",
+ &authentication_service_);
mojo::Array<mojo::String> scopes;
scopes.push_back("profile");
diff --git a/examples/bank_app/bank.cc b/examples/bank_app/bank.cc
index 753967c..dcb98cd 100644
--- a/examples/bank_app/bank.cc
+++ b/examples/bank_app/bank.cc
@@ -51,7 +51,7 @@
BankApp() {
}
void Initialize(mojo::ApplicationImpl* app) override {
- app->ConnectToService("mojo:principal_service", &login_service_);
+ app->ConnectToServiceDeprecated("mojo:principal_service", &login_service_);
}
// From ApplicationDelegate
diff --git a/examples/bank_app/customer.cc b/examples/bank_app/customer.cc
index a572de0..2af1e93 100644
--- a/examples/bank_app/customer.cc
+++ b/examples/bank_app/customer.cc
@@ -25,7 +25,7 @@
class BankCustomer : public mojo::ApplicationDelegate {
public:
void Initialize(mojo::ApplicationImpl* app) override {
- app->ConnectToService("mojo:principal_service", &login_service_);
+ app->ConnectToServiceDeprecated("mojo:principal_service", &login_service_);
// Login to the principal service to get a user identity.
login_service_->Login(LoginHandler());
@@ -35,7 +35,7 @@
}
BankPtr bank;
- app->ConnectToService("mojo:bank", &bank);
+ app->ConnectToServiceDeprecated("mojo:bank", &bank);
bank->Deposit(500/*usd*/);
bank->Withdraw(100/*usd*/);
auto gb_callback = [](const int32_t& balance) {
diff --git a/examples/echo/echo_benchmark.cc b/examples/echo/echo_benchmark.cc
index 0ebd679..7cf3bcd 100644
--- a/examples/echo/echo_benchmark.cc
+++ b/examples/echo/echo_benchmark.cc
@@ -57,9 +57,9 @@
for (int i = 0; i < num_clients_; i++) {
EchoPtr echo;
if (use_dart_server_) {
- app->ConnectToService("mojo:dart_echo_server", &echo);
+ app->ConnectToServiceDeprecated("mojo:dart_echo_server", &echo);
} else {
- app->ConnectToService("mojo:echo_server", &echo);
+ app->ConnectToServiceDeprecated("mojo:echo_server", &echo);
}
echoClients_.push_back(echo.Pass());
}
diff --git a/examples/echo/echo_client.cc b/examples/echo/echo_client.cc
index 5ff27cf..8d75af4 100644
--- a/examples/echo/echo_client.cc
+++ b/examples/echo/echo_client.cc
@@ -26,7 +26,7 @@
class EchoClientDelegate : public ApplicationDelegate {
public:
void Initialize(ApplicationImpl* app) override {
- app->ConnectToService("mojo:echo_server", &echo_);
+ app->ConnectToServiceDeprecated("mojo:echo_server", &echo_);
echo_->EchoString("hello world", ResponsePrinter());
}
diff --git a/examples/echo/echo_client_sync.cc b/examples/echo/echo_client_sync.cc
index 68f03e7..cd9592a 100644
--- a/examples/echo/echo_client_sync.cc
+++ b/examples/echo/echo_client_sync.cc
@@ -26,7 +26,7 @@
public:
void Initialize(ApplicationImpl* app) override {
EchoPtr echo;
- app->ConnectToService("mojo:echo_server", &echo);
+ app->ConnectToServiceDeprecated("mojo:echo_server", &echo);
mojo::String out = "yo!";
auto echo_proxy =
diff --git a/examples/hello_mojo/hello_mojo_client.cc b/examples/hello_mojo/hello_mojo_client.cc
index ba12db1..2dcde7f 100644
--- a/examples/hello_mojo/hello_mojo_client.cc
+++ b/examples/hello_mojo/hello_mojo_client.cc
@@ -25,7 +25,8 @@
~HelloMojoClientApp() override {}
void Initialize(mojo::ApplicationImpl* application) override {
- application->ConnectToService("mojo:hello_mojo_server", &hello_mojo_);
+ application->ConnectToServiceDeprecated("mojo:hello_mojo_server",
+ &hello_mojo_);
DoIt("hello");
DoIt("goodbye");
diff --git a/examples/http_handler/http_handler.cc b/examples/http_handler/http_handler.cc
index 5e9b0c2..79ad2c6 100644
--- a/examples/http_handler/http_handler.cc
+++ b/examples/http_handler/http_handler.cc
@@ -33,7 +33,7 @@
binding_.Bind(GetProxy(&http_handler_ptr));
http_server::HttpServerFactoryPtr http_server_factory;
- app->ConnectToService("mojo:http_server", &http_server_factory);
+ app->ConnectToServiceDeprecated("mojo:http_server", &http_server_factory);
mojo::NetAddressPtr local_address(mojo::NetAddress::New());
local_address->family = mojo::NetAddressFamily::IPV4;
diff --git a/examples/indirect_service/indirect_service_demo.cc b/examples/indirect_service/indirect_service_demo.cc
index 2c9d72a..99f2121 100644
--- a/examples/indirect_service/indirect_service_demo.cc
+++ b/examples/indirect_service/indirect_service_demo.cc
@@ -94,9 +94,10 @@
public:
void Initialize(ApplicationImpl* app) override {
IntegerServicePtr indirect_service_delegate;
- app->ConnectToService("mojo:indirect_integer_service",
- &indirect_integer_service_);
- app->ConnectToService("mojo:integer_service", &indirect_service_delegate);
+ app->ConnectToServiceDeprecated("mojo:indirect_integer_service",
+ &indirect_integer_service_);
+ app->ConnectToServiceDeprecated("mojo:integer_service",
+ &indirect_service_delegate);
indirect_integer_service_->Set(
indirect_service_delegate.PassInterfaceHandle());
diff --git a/examples/media_test/media_test.cc b/examples/media_test/media_test.cc
index f4782c1..2b3cb3b 100644
--- a/examples/media_test/media_test.cc
+++ b/examples/media_test/media_test.cc
@@ -22,7 +22,7 @@
const std::string& input_file_name)
: state_(MediaState::UNPREPARED) {
MediaFactoryPtr factory;
- app->ConnectToService("mojo:media_factory", &factory);
+ app->ConnectToServiceDeprecated("mojo:media_factory", &factory);
SeekingReaderPtr reader;
factory->CreateNetworkReader(input_file_name, GetProxy(&reader));
diff --git a/examples/native_run_app/native_run_app.cc b/examples/native_run_app/native_run_app.cc
index 2cb92be..c3cda1b 100644
--- a/examples/native_run_app/native_run_app.cc
+++ b/examples/native_run_app/native_run_app.cc
@@ -231,8 +231,8 @@
void Initialize(mojo::ApplicationImpl* application_impl) override {
DCHECK(!application_impl_);
application_impl_ = application_impl;
- application_impl_->ConnectToService("mojo:native_support",
- &native_support_process_);
+ application_impl_->ConnectToServiceDeprecated("mojo:native_support",
+ &native_support_process_);
}
bool ConfigureIncomingConnection(
diff --git a/examples/notification_generator/notification_generator.cc b/examples/notification_generator/notification_generator.cc
index 9d182b4..cfdb292 100644
--- a/examples/notification_generator/notification_generator.cc
+++ b/examples/notification_generator/notification_generator.cc
@@ -27,7 +27,8 @@
// mojo::ApplicationDelegate implementation.
void Initialize(mojo::ApplicationImpl* app) override {
- app->ConnectToService("mojo:notifications", ¬ification_service_);
+ app->ConnectToServiceDeprecated("mojo:notifications",
+ ¬ification_service_);
PostFirstNotification();
}
diff --git a/examples/spinning_cube/spinning_cube_app.cc b/examples/spinning_cube/spinning_cube_app.cc
index 54805d5..f5deeb9 100644
--- a/examples/spinning_cube/spinning_cube_app.cc
+++ b/examples/spinning_cube/spinning_cube_app.cc
@@ -32,7 +32,7 @@
}
void Initialize(mojo::ApplicationImpl* app) override {
- app->ConnectToService("mojo:native_viewport_service", &viewport_);
+ app->ConnectToServiceDeprecated("mojo:native_viewport_service", &viewport_);
viewport_.set_connection_error_handler(
[this]() { OnViewportConnectionError(); });
diff --git a/examples/ui/tile/tile_view.cc b/examples/ui/tile/tile_view.cc
index 7f51f8c..2870b3a 100644
--- a/examples/ui/tile/tile_view.cc
+++ b/examples/ui/tile/tile_view.cc
@@ -40,7 +40,7 @@
for (const auto& url : params_.view_urls) {
// Start connecting to the view provider.
mojo::ui::ViewProviderPtr provider;
- app_impl()->ConnectToService(url, &provider);
+ app_impl()->ConnectToServiceDeprecated(url, &provider);
LOG(INFO) << "Connecting to view: child_key=" << child_key
<< ", url=" << url;
diff --git a/examples/wget/wget.cc b/examples/wget/wget.cc
index 275c13e..02b5702 100644
--- a/examples/wget/wget.cc
+++ b/examples/wget/wget.cc
@@ -77,7 +77,7 @@
class WGetApp : public ApplicationDelegate {
public:
void Initialize(ApplicationImpl* app) override {
- app->ConnectToService("mojo:network_service", &network_service_);
+ app->ConnectToServiceDeprecated("mojo:network_service", &network_service_);
Start(app->args());
}
diff --git a/mojo/common/tracing_impl.cc b/mojo/common/tracing_impl.cc
index a93e3d8..fa48a23 100644
--- a/mojo/common/tracing_impl.cc
+++ b/mojo/common/tracing_impl.cc
@@ -15,7 +15,8 @@
TracingImpl::~TracingImpl() {}
void TracingImpl::Initialize(ApplicationImpl* app) {
- ApplicationConnection* connection = app->ConnectToApplication("mojo:tracing");
+ ApplicationConnection* connection =
+ app->ConnectToApplicationDeprecated("mojo:tracing");
connection->AddService(this);
#ifdef NDEBUG
diff --git a/mojo/file_utils/file_util_unittest.cc b/mojo/file_utils/file_util_unittest.cc
index 4a19cdd..80ca03a 100644
--- a/mojo/file_utils/file_util_unittest.cc
+++ b/mojo/file_utils/file_util_unittest.cc
@@ -135,7 +135,7 @@
TEST_F(FileUtilTest, BasicCreateTemporaryFile) {
mojo::files::FilesPtr files;
- application_impl()->ConnectToService("mojo:files", &files);
+ application_impl()->ConnectToServiceDeprecated("mojo:files", &files);
mojo::files::Error error = mojo::files::Error::INTERNAL;
mojo::files::DirectoryPtr directory;
diff --git a/mojo/public/cpp/application/application_impl.h b/mojo/public/cpp/application/application_impl.h
index c3f90e3..cbb8fba 100644
--- a/mojo/public/cpp/application/application_impl.h
+++ b/mojo/public/cpp/application/application_impl.h
@@ -63,21 +63,24 @@
// passing it to another thread.)
InterfaceHandle<ApplicationConnector> CreateApplicationConnector();
+ // DEPRECATED.
// Requests a new connection to an application. Returns a pointer to the
// connection if the connection is permitted by this application's delegate,
// or nullptr otherwise. Caller does not take ownership. The pointer remains
// valid until an error occurs on the connection with the Shell, or until the
// ApplicationImpl is destroyed, whichever occurs first.
// TODO(vtl): Deprecate/remove this.
- ApplicationConnection* ConnectToApplication(const String& application_url);
+ ApplicationConnection* ConnectToApplicationDeprecated(
+ const String& application_url);
+ // DEPRECATED. (You should probably use something from connect.h instead.)
// Connect to application identified by |application_url| and connect to the
// service implementation of the interface identified by |Interface|.
// TODO(vtl): Deprecate/remove this.
template <typename Interface>
- void ConnectToService(const std::string& application_url,
- InterfacePtr<Interface>* ptr) {
- ConnectToApplication(application_url)->ConnectToService(ptr);
+ void ConnectToServiceDeprecated(const std::string& application_url,
+ InterfacePtr<Interface>* ptr) {
+ ConnectToApplicationDeprecated(application_url)->ConnectToService(ptr);
}
// Blocks until the |Application| is initialized (i.e., |Initialize()| is
diff --git a/mojo/public/cpp/application/lib/application_impl.cc b/mojo/public/cpp/application/lib/application_impl.cc
index de346af..806800c 100644
--- a/mojo/public/cpp/application/lib/application_impl.cc
+++ b/mojo/public/cpp/application/lib/application_impl.cc
@@ -33,7 +33,7 @@
return application_connector;
}
-ApplicationConnection* ApplicationImpl::ConnectToApplication(
+ApplicationConnection* ApplicationImpl::ConnectToApplicationDeprecated(
const String& application_url) {
MOJO_CHECK(shell_);
InterfaceHandle<ServiceProvider> local_services;
diff --git a/mojo/public/cpp/bindings/tests/versioning_apptest.cc b/mojo/public/cpp/bindings/tests/versioning_apptest.cc
index d3f111a..8b4c2c7 100644
--- a/mojo/public/cpp/bindings/tests/versioning_apptest.cc
+++ b/mojo/public/cpp/bindings/tests/versioning_apptest.cc
@@ -21,8 +21,8 @@
void SetUp() override {
ApplicationTestBase::SetUp();
- application_impl()->ConnectToService("mojo:versioning_test_service",
- &database_);
+ application_impl()->ConnectToServiceDeprecated(
+ "mojo:versioning_test_service", &database_);
}
HumanResourceDatabasePtr database_;
diff --git a/mojo/services/files/c/tests/mojio_impl_test_base.cc b/mojo/services/files/c/tests/mojio_impl_test_base.cc
index b1b998d..f169f2f 100644
--- a/mojo/services/files/c/tests/mojio_impl_test_base.cc
+++ b/mojo/services/files/c/tests/mojio_impl_test_base.cc
@@ -26,8 +26,8 @@
mojo::test::ApplicationTestBase::SetUp();
mojo::files::FilesPtr files_async;
- // TODO(vtl): Fix |ConnectToService()|, etc.
- application_impl()->ConnectToService("mojo:files", &files_async);
+ // TODO(vtl): Fix this.
+ application_impl()->ConnectToServiceDeprecated("mojo:files", &files_async);
auto files = SynchronousInterfacePtr<mojo::files::Files>::Create(
files_async.PassInterfaceHandle());
diff --git a/mojo/ui/base_view.cc b/mojo/ui/base_view.cc
index c47ee30..76f41b9 100644
--- a/mojo/ui/base_view.cc
+++ b/mojo/ui/base_view.cc
@@ -17,7 +17,8 @@
view_listener_binding_(this),
view_container_listener_binding_(this) {
DCHECK(app_impl_);
- app_impl_->ConnectToService("mojo:view_manager_service", &view_manager_);
+ app_impl_->ConnectToServiceDeprecated("mojo:view_manager_service",
+ &view_manager_);
mojo::ui::ViewListenerPtr view_listener;
view_listener_binding_.Bind(mojo::GetProxy(&view_listener));
diff --git a/services/asset_bundle/asset_bundle_apptest.cc b/services/asset_bundle/asset_bundle_apptest.cc
index 804866c..37d6721 100644
--- a/services/asset_bundle/asset_bundle_apptest.cc
+++ b/services/asset_bundle/asset_bundle_apptest.cc
@@ -22,7 +22,8 @@
void SetUp() override {
mojo::test::ApplicationTestBase::SetUp();
- application_impl()->ConnectToService("mojo:asset_bundle", &asset_unpacker_);
+ application_impl()->ConnectToServiceDeprecated("mojo:asset_bundle",
+ &asset_unpacker_);
}
protected:
diff --git a/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_apptest.cc b/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_apptest.cc
index 19abdd4..6f361f6 100644
--- a/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_apptest.cc
+++ b/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_apptest.cc
@@ -290,7 +290,7 @@
ApplicationTestBase::SetUp();
InitializeNetworkService();
- application_impl()->ConnectToService(
+ application_impl()->ConnectToServiceDeprecated(
"mojo:authenticating_url_loader_interceptor",
&interceptor_meta_factory_);
}
@@ -341,8 +341,8 @@
void InitializeNetworkService() {
network_service_.reset();
- application_impl()->ConnectToService("mojo:network_service",
- &network_service_);
+ application_impl()->ConnectToServiceDeprecated("mojo:network_service",
+ &network_service_);
}
void CloseAuthenticationService() { authentication_service_impl_.reset(); }
diff --git a/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_factory.cc b/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_factory.cc
index 825855c..2da79d8 100644
--- a/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_factory.cc
+++ b/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_factory.cc
@@ -26,7 +26,7 @@
std::move(authentication_service))),
app_(app),
cached_tokens_(cached_tokens) {
- app_->ConnectToService("mojo:network_service", &network_service_);
+ app_->ConnectToServiceDeprecated("mojo:network_service", &network_service_);
authentication_service_.set_connection_error_handler(
[this]() { ClearAuthenticationService(); });
}
diff --git a/services/authentication/accounts_db_manager_unittest.cc b/services/authentication/accounts_db_manager_unittest.cc
index 239bf4c..7c12c04 100644
--- a/services/authentication/accounts_db_manager_unittest.cc
+++ b/services/authentication/accounts_db_manager_unittest.cc
@@ -24,7 +24,7 @@
void SetUp() override {
mojo::test::ApplicationTestBase::SetUp();
mojo::files::FilesPtr files;
- application_impl()->ConnectToService("mojo:files", &files);
+ application_impl()->ConnectToServiceDeprecated("mojo:files", &files);
mojo::files::Error error = mojo::files::Error::INTERNAL;
mojo::files::DirectoryPtr directory;
diff --git a/services/authentication/main.cc b/services/authentication/main.cc
index a40d965..9664731 100644
--- a/services/authentication/main.cc
+++ b/services/authentication/main.cc
@@ -25,8 +25,8 @@
~GoogleAccountManagerApp() override {}
void Initialize(mojo::ApplicationImpl* app) override {
- app->ConnectToService("mojo:network_service", &network_service_);
- app->ConnectToService("mojo:files", &files_);
+ app->ConnectToServiceDeprecated("mojo:network_service", &network_service_);
+ app->ConnectToServiceDeprecated("mojo:files", &files_);
app_url_ = app->url();
}
diff --git a/services/clipboard/clipboard_apptest.cc b/services/clipboard/clipboard_apptest.cc
index 2093990..d534eb4 100644
--- a/services/clipboard/clipboard_apptest.cc
+++ b/services/clipboard/clipboard_apptest.cc
@@ -54,7 +54,8 @@
void SetUp() override {
mojo::test::ApplicationTestBase::SetUp();
- application_impl()->ConnectToService("mojo:clipboard", &clipboard_);
+ application_impl()->ConnectToServiceDeprecated("mojo:clipboard",
+ &clipboard_);
}
uint64_t GetSequenceNumber() {
diff --git a/services/contacts/contacts_apptest.cc b/services/contacts/contacts_apptest.cc
index e701dcb..5541926 100644
--- a/services/contacts/contacts_apptest.cc
+++ b/services/contacts/contacts_apptest.cc
@@ -16,7 +16,8 @@
void SetUp() override {
mojo::test::ApplicationTestBase::SetUp();
- application_impl()->ConnectToService("mojo:contacts", &contacts_service_);
+ application_impl()->ConnectToServiceDeprecated("mojo:contacts",
+ &contacts_service_);
}
protected:
diff --git a/services/dart/content_handler_app_service_connector.cc b/services/dart/content_handler_app_service_connector.cc
index 38233cc..58d8069 100644
--- a/services/dart/content_handler_app_service_connector.cc
+++ b/services/dart/content_handler_app_service_connector.cc
@@ -18,7 +18,7 @@
std::string application_name,
mojo::InterfaceRequest<Interface> interface_request) {
mojo::ApplicationConnection* application_connection =
- content_handler_app_->ConnectToApplication(application_name);
+ content_handler_app_->ConnectToApplicationDeprecated(application_name);
if (!application_connection)
return;
mojo::ServiceProvider* sp = application_connection->GetServiceProvider();
diff --git a/services/dart/content_handler_main.cc b/services/dart/content_handler_main.cc
index 219f2be..49560c2 100644
--- a/services/dart/content_handler_main.cc
+++ b/services/dart/content_handler_main.cc
@@ -186,8 +186,8 @@
base::MessageLoop::current()->task_runner());
strict_content_handler_.set_handler_task_runner(
base::MessageLoop::current()->task_runner());
- app->ConnectToService("mojo:url_response_disk_cache",
- &url_response_disk_cache_);
+ app->ConnectToServiceDeprecated("mojo:url_response_disk_cache",
+ &url_response_disk_cache_);
service_connector_ = new ContentHandlerAppServiceConnector(app);
if (app->HasArg(kRunOnMessageLoop)) {
diff --git a/services/dart/dart_tracing.cc b/services/dart/dart_tracing.cc
index 0ff1b4d..4b80d0d 100644
--- a/services/dart/dart_tracing.cc
+++ b/services/dart/dart_tracing.cc
@@ -130,7 +130,7 @@
}
void DartTracingImpl::Initialize(mojo::ApplicationImpl* app) {
- auto connection = app->ConnectToApplication("mojo:tracing");
+ auto connection = app->ConnectToApplicationDeprecated("mojo:tracing");
connection->AddService(this);
}
diff --git a/services/debugger/debugger.cc b/services/debugger/debugger.cc
index 4150ade..62f222a 100644
--- a/services/debugger/debugger.cc
+++ b/services/debugger/debugger.cc
@@ -47,7 +47,7 @@
}
base::StringToUint(app->args()[1], &command_port_);
http_server::HttpServerFactoryPtr http_server_factory;
- app->ConnectToService("mojo:http_server", &http_server_factory);
+ app->ConnectToServiceDeprecated("mojo:http_server", &http_server_factory);
mojo::NetAddressPtr local_address(mojo::NetAddress::New());
local_address->family = mojo::NetAddressFamily::IPV4;
@@ -121,7 +121,7 @@
}
if (!tracing_)
- app_->ConnectToService("mojo:tracing", &tracing_);
+ app_->ConnectToServiceDeprecated("mojo:tracing", &tracing_);
is_tracing_ = true;
mojo::DataPipe pipe;
tracing_->Start(pipe.producer_handle.Pass(), mojo::String("*"));
diff --git a/services/files/files_test_base.cc b/services/files/files_test_base.cc
index bf52e6a..e1826f1 100644
--- a/services/files/files_test_base.cc
+++ b/services/files/files_test_base.cc
@@ -17,9 +17,9 @@
void FilesTestBase::SetUp() {
test::ApplicationTestBase::SetUp();
- // TODO(vtl): Fix |ConnectToService()|.
+ // TODO(vtl): Fix this.
FilesPtr files_async;
- application_impl()->ConnectToService("mojo:files", &files_async);
+ application_impl()->ConnectToServiceDeprecated("mojo:files", &files_async);
files_ =
SynchronousInterfacePtr<Files>::Create(files_async.PassInterfaceHandle());
}
diff --git a/services/http_server/http_server_apptest.cc b/services/http_server/http_server_apptest.cc
index c27aa35..a48ccf8 100644
--- a/services/http_server/http_server_apptest.cc
+++ b/services/http_server/http_server_apptest.cc
@@ -97,10 +97,10 @@
void SetUp() override {
ApplicationTestBase::SetUp();
- application_impl()->ConnectToService("mojo:http_server",
- &http_server_factory_);
- application_impl()->ConnectToService("mojo:network_service",
- &network_service_);
+ application_impl()->ConnectToServiceDeprecated("mojo:http_server",
+ &http_server_factory_);
+ application_impl()->ConnectToServiceDeprecated("mojo:network_service",
+ &network_service_);
}
http_server::HttpServerPtr CreateHttpServer();
diff --git a/services/http_server/http_server_impl.cc b/services/http_server/http_server_impl.cc
index c05f39c..b43af73 100644
--- a/services/http_server/http_server_impl.cc
+++ b/services/http_server/http_server_impl.cc
@@ -23,7 +23,7 @@
requested_local_address_(requested_local_address.Pass()),
assigned_port_(0),
weak_ptr_factory_(this) {
- app->ConnectToService("mojo:network_service", &network_service_);
+ app->ConnectToServiceDeprecated("mojo:network_service", &network_service_);
Start();
}
diff --git a/services/java_handler/java_handler.cc b/services/java_handler/java_handler.cc
index 8079eda..440f72f 100644
--- a/services/java_handler/java_handler.cc
+++ b/services/java_handler/java_handler.cc
@@ -91,8 +91,8 @@
void JavaHandler::Initialize(mojo::ApplicationImpl* app) {
tracing_.Initialize(app);
handler_task_runner_ = base::MessageLoop::current()->task_runner();
- app->ConnectToService("mojo:url_response_disk_cache",
- &url_response_disk_cache_);
+ app->ConnectToServiceDeprecated("mojo:url_response_disk_cache",
+ &url_response_disk_cache_);
}
void JavaHandler::GetApplication(base::FilePath* archive_path,
diff --git a/services/js/echo_apptest.cc b/services/js/echo_apptest.cc
index d11dc19..7a8a3c5 100644
--- a/services/js/echo_apptest.cc
+++ b/services/js/echo_apptest.cc
@@ -20,7 +20,7 @@
void SetUp() override {
ApplicationTestBase::SetUp();
const std::string& url = JSAppURL("echo.js");
- application_impl()->ConnectToService(url, &echo_service_);
+ application_impl()->ConnectToServiceDeprecated(url, &echo_service_);
}
mojo::EchoServicePtr echo_service_;
diff --git a/services/js/network_apptest.cc b/services/js/network_apptest.cc
index 94381a5..aebab42 100644
--- a/services/js/network_apptest.cc
+++ b/services/js/network_apptest.cc
@@ -19,7 +19,7 @@
void SetUp() override {
ApplicationTestBase::SetUp();
const std::string& url = JSAppURL("network_test.js");
- application_impl()->ConnectToService(url, &network_test_service_);
+ application_impl()->ConnectToServiceDeprecated(url, &network_test_service_);
}
NetworkTestServicePtr network_test_service_;
diff --git a/services/js/pingpong_apptest.cc b/services/js/pingpong_apptest.cc
index e5e4ad3..a1c5f1d 100644
--- a/services/js/pingpong_apptest.cc
+++ b/services/js/pingpong_apptest.cc
@@ -45,7 +45,7 @@
void SetUp() override {
ApplicationTestBase::SetUp();
const std::string& url = JSAppURL("pingpong.js");
- application_impl()->ConnectToService(url, &pingpong_service_);
+ application_impl()->ConnectToServiceDeprecated(url, &pingpong_service_);
PingPongClientPtr client_ptr;
pingpong_client_.Bind(GetProxy(&client_ptr));
pingpong_service_->SetClient(client_ptr.Pass());
@@ -92,7 +92,8 @@
// pingpong-target.js URL, we provide a connection to its PingPongService.
TEST_F(JSPingPongTest, PingTargetService) {
PingPongServicePtr target;
- application_impl()->ConnectToService(JSAppURL("pingpong_target.js"), &target);
+ application_impl()->ConnectToServiceDeprecated(JSAppURL("pingpong_target.js"),
+ &target);
bool returned_value = false;
PingTargetCallback callback(&returned_value);
pingpong_service_->PingTargetService(target.Pass(), 9, callback);
diff --git a/services/media/factory_service/audio_track_controller.cc b/services/media/factory_service/audio_track_controller.cc
index 85733fc..b36e765 100644
--- a/services/media/factory_service/audio_track_controller.cc
+++ b/services/media/factory_service/audio_track_controller.cc
@@ -20,7 +20,7 @@
DCHECK(app);
AudioServerPtr audio_server;
- app->ConnectToService(url, &audio_server);
+ app->ConnectToServiceDeprecated(url, &audio_server);
audio_server->CreateTrack(GetProxy(&audio_track_));
}
diff --git a/services/media/factory_service/media_player_impl.cc b/services/media/factory_service/media_player_impl.cc
index 49cf9f1..fde6362 100644
--- a/services/media/factory_service/media_player_impl.cc
+++ b/services/media/factory_service/media_player_impl.cc
@@ -39,7 +39,7 @@
// Go away when the client is no longer connected.
binding_.set_connection_error_handler([this]() { ReleaseFromOwner(); });
- app()->ConnectToService("mojo:media_factory", &factory_);
+ app()->ConnectToServiceDeprecated("mojo:media_factory", &factory_);
factory_->CreateDemux(reader.Pass(), GetProxy(&demux_));
diff --git a/services/media/factory_service/network_reader_impl.cc b/services/media/factory_service/network_reader_impl.cc
index c4e8a0d..1222945 100644
--- a/services/media/factory_service/network_reader_impl.cc
+++ b/services/media/factory_service/network_reader_impl.cc
@@ -34,7 +34,7 @@
NetworkServicePtr network_service;
- app()->ConnectToService("mojo:network_service", &network_service);
+ app()->ConnectToServiceDeprecated("mojo:network_service", &network_service);
network_service->CreateURLLoader(GetProxy(&url_loader_));
diff --git a/services/nacl/nonsfi/content_handler_main_pexe.cc b/services/nacl/nonsfi/content_handler_main_pexe.cc
index b4821f0..78b3d90 100644
--- a/services/nacl/nonsfi/content_handler_main_pexe.cc
+++ b/services/nacl/nonsfi/content_handler_main_pexe.cc
@@ -78,9 +78,9 @@
private:
// Overridden from ApplicationDelegate:
void Initialize(mojo::ApplicationImpl* app) override {
- app->ConnectToService("mojo:pnacl_compile", &compiler_init_);
- app->ConnectToService("mojo:pnacl_link", &linker_init_);
- app->ConnectToService("mojo:files", &files_);
+ app->ConnectToServiceDeprecated("mojo:pnacl_compile", &compiler_init_);
+ app->ConnectToServiceDeprecated("mojo:pnacl_link", &linker_init_);
+ app->ConnectToServiceDeprecated("mojo:files", &files_);
mojo::files::Error error = mojo::files::Error::INTERNAL;
files_->OpenFileSystem("app_persistent_cache",
GetProxy(&nexe_cache_directory),
diff --git a/services/nacl/sfi/content_handler_main.cc b/services/nacl/sfi/content_handler_main.cc
index 2abfae7..a7c9ee8 100644
--- a/services/nacl/sfi/content_handler_main.cc
+++ b/services/nacl/sfi/content_handler_main.cc
@@ -81,7 +81,7 @@
url_ = GURL(app->url());
mojo::NetworkServicePtr network_service;
- app->ConnectToService("mojo:network_service", &network_service);
+ app->ConnectToServiceDeprecated("mojo:network_service", &network_service);
network_service->CreateURLLoader(GetProxy(&url_loader_));
}
diff --git a/services/native_support/process_test_base.cc b/services/native_support/process_test_base.cc
index 9272f69..08fd0a6 100644
--- a/services/native_support/process_test_base.cc
+++ b/services/native_support/process_test_base.cc
@@ -18,8 +18,9 @@
void ProcessTestBase::SetUp() {
mojo::test::ApplicationTestBase::SetUp();
ProcessPtr process_async;
- // TODO(vtl): Fix |ConnectToService()|.
- application_impl()->ConnectToService("mojo:native_support", &process_async);
+ // TODO(vtl): Fix this.
+ application_impl()->ConnectToServiceDeprecated("mojo:native_support",
+ &process_async);
process_ = SynchronousInterfacePtr<Process>::Create(
process_async.PassInterfaceHandle());
}
diff --git a/services/native_viewport/platform_viewport_android.cc b/services/native_viewport/platform_viewport_android.cc
index 2553783..ed34c8b 100644
--- a/services/native_viewport/platform_viewport_android.cc
+++ b/services/native_viewport/platform_viewport_android.cc
@@ -166,8 +166,8 @@
Java_PlatformViewportAndroid_createRequest(env,
reinterpret_cast<intptr_t>(this));
- application_->ConnectToService("mojo:native_viewport_support",
- &support_service_);
+ application_->ConnectToServiceDeprecated("mojo:native_viewport_support",
+ &support_service_);
support_service_->CreateNewNativeWindow(
base::Bind(&PlatformViewportAndroid::Close, weak_factory_.GetWeakPtr()));
}
diff --git a/services/notifications/apptests/notifications_apptest.cc b/services/notifications/apptests/notifications_apptest.cc
index 8315587..c5e17f2 100644
--- a/services/notifications/apptests/notifications_apptest.cc
+++ b/services/notifications/apptests/notifications_apptest.cc
@@ -30,8 +30,8 @@
// ApplicationTestBase:
void SetUp() override {
ApplicationTestBase::SetUp();
- application_impl()->ConnectToService("mojo:notifications",
- ¬ification_service_);
+ application_impl()->ConnectToServiceDeprecated("mojo:notifications",
+ ¬ification_service_);
}
notifications::NotificationServicePtr notification_service_;
diff --git a/services/prediction/prediction_apptests.cc b/services/prediction/prediction_apptests.cc
index 2522fe7..9e1ee25 100644
--- a/services/prediction/prediction_apptests.cc
+++ b/services/prediction/prediction_apptests.cc
@@ -26,8 +26,8 @@
void SetUp() override {
mojo::test::ApplicationTestBase::SetUp();
- application_impl()->ConnectToService("mojo:prediction_service",
- &prediction_);
+ application_impl()->ConnectToServiceDeprecated("mojo:prediction_service",
+ &prediction_);
}
std::vector<std::string> GetPredictionListClient(
diff --git a/services/python/mojo_url_redirector/mojo_url_redirector_apptest.cc b/services/python/mojo_url_redirector/mojo_url_redirector_apptest.cc
index 38e6ba6..3d664f0 100644
--- a/services/python/mojo_url_redirector/mojo_url_redirector_apptest.cc
+++ b/services/python/mojo_url_redirector/mojo_url_redirector_apptest.cc
@@ -97,8 +97,8 @@
binding_.Bind(GetProxy(&location_files_handler));
http_server::HttpServerFactoryPtr http_server_factory;
- application_impl()->ConnectToService("mojo:http_server",
- &http_server_factory);
+ application_impl()->ConnectToServiceDeprecated("mojo:http_server",
+ &http_server_factory);
mojo::NetAddressPtr location_files_server_addr(mojo::NetAddress::New());
location_files_server_addr->family = mojo::NetAddressFamily::IPV4;
@@ -122,9 +122,10 @@
// Connect to the redirector and wait until it registers itself as a
// handler with the server on |redirector_port_|.
- application_impl()->ConnectToApplication("mojo:mojo_url_redirector");
- application_impl()->ConnectToService("mojo:network_service",
- &network_service_);
+ application_impl()->ConnectToApplicationDeprecated(
+ "mojo:mojo_url_redirector");
+ application_impl()->ConnectToServiceDeprecated("mojo:network_service",
+ &network_service_);
WaitForRedirectorRegistration();
}
diff --git a/services/test_service/test_service_impl.cc b/services/test_service/test_service_impl.cc
index 9d7d8f8..aa0f4d5 100644
--- a/services/test_service/test_service_impl.cc
+++ b/services/test_service/test_service_impl.cc
@@ -43,7 +43,7 @@
void TestServiceImpl::ConnectToAppAndGetTime(
const mojo::String& app_url,
const mojo::Callback<void(int64_t)>& callback) {
- app_impl_->ConnectToService(app_url, &time_service_);
+ app_impl_->ConnectToServiceDeprecated(app_url, &time_service_);
if (tracking_) {
tracking_->RecordNewRequest();
time_service_->StartTrackingRequests(mojo::Callback<void()>());
@@ -54,7 +54,8 @@
void TestServiceImpl::StartTrackingRequests(
const mojo::Callback<void()>& callback) {
TestRequestTrackerPtr tracker;
- app_impl_->ConnectToService("mojo:test_request_tracker_app", &tracker);
+ app_impl_->ConnectToServiceDeprecated("mojo:test_request_tracker_app",
+ &tracker);
tracking_.reset(new TrackedService(tracker.Pass(), Name_, callback));
}
diff --git a/services/test_service/test_time_service_impl.cc b/services/test_service/test_time_service_impl.cc
index c5cf401..f772d36 100644
--- a/services/test_service/test_time_service_impl.cc
+++ b/services/test_service/test_time_service_impl.cc
@@ -23,7 +23,8 @@
void TestTimeServiceImpl::StartTrackingRequests(
const mojo::Callback<void()>& callback) {
TestRequestTrackerPtr tracker;
- app_impl_->ConnectToService("mojo:test_request_tracker_app", &tracker);
+ app_impl_->ConnectToServiceDeprecated("mojo:test_request_tracker_app",
+ &tracker);
tracking_.reset(new TrackedService(tracker.Pass(), Name_, callback));
}
diff --git a/services/ui/launcher/launch_instance.cc b/services/ui/launcher/launch_instance.cc
index 89a2298..4b87de4 100644
--- a/services/ui/launcher/launch_instance.cc
+++ b/services/ui/launcher/launch_instance.cc
@@ -30,18 +30,20 @@
DVLOG(1) << "Launching " << app_url_;
TRACE_EVENT0("launcher", __func__);
- app_impl_->ConnectToService("mojo:compositor_service", &compositor_);
+ app_impl_->ConnectToServiceDeprecated("mojo:compositor_service",
+ &compositor_);
compositor_.set_connection_error_handler(base::Bind(
&LaunchInstance::OnCompositorConnectionError, base::Unretained(this)));
- app_impl_->ConnectToService("mojo:view_manager_service", &view_manager_);
+ app_impl_->ConnectToServiceDeprecated("mojo:view_manager_service",
+ &view_manager_);
view_manager_.set_connection_error_handler(base::Bind(
&LaunchInstance::OnViewManagerConnectionError, base::Unretained(this)));
InitViewport();
mojo::ui::ViewProviderPtr client_view_provider;
- app_impl_->ConnectToService(app_url_, &client_view_provider);
+ app_impl_->ConnectToServiceDeprecated(app_url_, &client_view_provider);
client_view_provider->CreateView(mojo::GetProxy(&client_view_owner_), nullptr,
nullptr);
@@ -58,7 +60,8 @@
}
void LaunchInstance::InitViewport() {
- app_impl_->ConnectToService("mojo:native_viewport_service", &viewport_);
+ app_impl_->ConnectToServiceDeprecated("mojo:native_viewport_service",
+ &viewport_);
viewport_.set_connection_error_handler(base::Bind(
&LaunchInstance::OnViewportConnectionError, base::Unretained(this)));
diff --git a/services/ui/view_manager/view_associate_table.cc b/services/ui/view_manager/view_associate_table.cc
index bcfca3b..f3913ca 100644
--- a/services/ui/view_manager/view_associate_table.cc
+++ b/services/ui/view_manager/view_associate_table.cc
@@ -35,7 +35,7 @@
associates_.emplace_back(new AssociateData(url, inspector));
AssociateData* data = associates_.back().get();
- app_impl->ConnectToService(url, &data->associate);
+ app_impl->ConnectToServiceDeprecated(url, &data->associate);
data->associate.set_connection_error_handler(
base::Bind(connection_error_callback, url));
diff --git a/services/ui/view_manager/view_manager_app.cc b/services/ui/view_manager/view_manager_app.cc
index 98c545c..07d2d89 100644
--- a/services/ui/view_manager/view_manager_app.cc
+++ b/services/ui/view_manager/view_manager_app.cc
@@ -36,7 +36,7 @@
// Connect to compositor.
mojo::gfx::composition::CompositorPtr compositor;
- app_impl_->ConnectToService("mojo:compositor_service", &compositor);
+ app_impl_->ConnectToServiceDeprecated("mojo:compositor_service", &compositor);
compositor.set_connection_error_handler(base::Bind(
&ViewManagerApp::OnCompositorConnectionError, base::Unretained(this)));
diff --git a/services/url_response_disk_cache/url_response_disk_cache_apptest.cc b/services/url_response_disk_cache/url_response_disk_cache_apptest.cc
index 794d15c..765d070 100644
--- a/services/url_response_disk_cache/url_response_disk_cache_apptest.cc
+++ b/services/url_response_disk_cache/url_response_disk_cache_apptest.cc
@@ -24,8 +24,8 @@
void SetUp() override {
mojo::test::ApplicationTestBase::SetUp();
- application_impl()->ConnectToService("mojo:url_response_disk_cache",
- &url_response_disk_cache_);
+ application_impl()->ConnectToServiceDeprecated(
+ "mojo:url_response_disk_cache", &url_response_disk_cache_);
}
protected:
diff --git a/shell/android/android_handler.cc b/shell/android/android_handler.cc
index 2a30ed5..a092dea 100644
--- a/shell/android/android_handler.cc
+++ b/shell/android/android_handler.cc
@@ -125,8 +125,8 @@
void AndroidHandler::Initialize(mojo::ApplicationImpl* app) {
handler_task_runner_ = base::MessageLoop::current()->task_runner();
- app->ConnectToService("mojo:url_response_disk_cache",
- &url_response_disk_cache_);
+ app->ConnectToServiceDeprecated("mojo:url_response_disk_cache",
+ &url_response_disk_cache_);
}
bool AndroidHandler::ConfigureIncomingConnection(
diff --git a/shell/android/nfc_apptest.cc b/shell/android/nfc_apptest.cc
index 6165925..2e062ea 100644
--- a/shell/android/nfc_apptest.cc
+++ b/shell/android/nfc_apptest.cc
@@ -26,7 +26,7 @@
// ApplicationTestBase:
void SetUp() override {
ApplicationTestBase::SetUp();
- application_impl()->ConnectToService("mojo:nfc", &nfc_);
+ application_impl()->ConnectToServiceDeprecated("mojo:nfc", &nfc_);
}
nfc::NfcPtr nfc_;
diff --git a/shell/application_manager/application_manager_unittest.cc b/shell/application_manager/application_manager_unittest.cc
index de6fdc5..bbf84bb 100644
--- a/shell/application_manager/application_manager_unittest.cc
+++ b/shell/application_manager/application_manager_unittest.cc
@@ -360,7 +360,7 @@
void Create(ApplicationConnection* connection,
InterfaceRequest<TestA> request) override {
ApplicationConnection* b_connection =
- app_->ConnectToApplication(kTestBURLString);
+ app_->ConnectToApplicationDeprecated(kTestBURLString);
b_connection->AddService<TestC>(this);
a_bindings_.push_back(
new TestAImpl(b_connection, context_, request.Pass()));
diff --git a/shell/shell_apptest.cc b/shell/shell_apptest.cc
index 09988e5..1223da2 100644
--- a/shell/shell_apptest.cc
+++ b/shell/shell_apptest.cc
@@ -80,8 +80,8 @@
void SetUp() override {
ShellAppTest::SetUp();
- application_impl()->ConnectToService("mojo:http_server",
- &http_server_factory_);
+ application_impl()->ConnectToServiceDeprecated("mojo:http_server",
+ &http_server_factory_);
mojo::NetAddressPtr local_address(mojo::NetAddress::New());
local_address->family = mojo::NetAddressFamily::IPV4;
@@ -119,7 +119,7 @@
// Test that we can load apps over http.
TEST_F(ShellHTTPAppTest, Http) {
PingablePtr pingable;
- application_impl()->ConnectToService(GetURL("app"), &pingable);
+ application_impl()->ConnectToServiceDeprecated(GetURL("app"), &pingable);
pingable->Ping("hello",
[this](const String& app_url, const String& connection_url,
const String& message) {
@@ -135,7 +135,7 @@
// TODO(aa): Test that apps receive the correct URL parameters.
TEST_F(ShellHTTPAppTest, Redirect) {
PingablePtr pingable;
- application_impl()->ConnectToService(GetURL("redirect"), &pingable);
+ application_impl()->ConnectToServiceDeprecated(GetURL("redirect"), &pingable);
pingable->Ping("hello",
[this](const String& app_url, const String& connection_url,
const String& message) {
@@ -157,8 +157,8 @@
TEST_F(ShellHTTPAppTest, MAYBE_QueryHandling) {
PingablePtr pingable1;
PingablePtr pingable2;
- application_impl()->ConnectToService(GetURL("app?foo"), &pingable1);
- application_impl()->ConnectToService(GetURL("app?bar"), &pingable2);
+ application_impl()->ConnectToServiceDeprecated(GetURL("app?foo"), &pingable1);
+ application_impl()->ConnectToServiceDeprecated(GetURL("app?bar"), &pingable2);
int num_responses = 0;
auto callbacks_builder = [this, &num_responses](int query_index) {
@@ -187,7 +187,8 @@
// mojo: URLs can have querystrings too
TEST_F(ShellAppTest, MojoURLQueryHandling) {
PingablePtr pingable;
- application_impl()->ConnectToService("mojo:pingable_app?foo", &pingable);
+ application_impl()->ConnectToServiceDeprecated("mojo:pingable_app?foo",
+ &pingable);
auto callback = [](const String& app_url, const String& connection_url,
const String& message) {
EXPECT_TRUE(base::EndsWith(app_url.To<base::StringPiece>(),