diff options
Diffstat (limited to 'mojo')
-rw-r--r-- | mojo/services/network/http_server_apptest.cc | 2 | ||||
-rw-r--r-- | mojo/services/tracing/public/cpp/tracing_impl.cc | 2 | ||||
-rw-r--r-- | mojo/shell/application_manager_apptest.cc | 2 | ||||
-rw-r--r-- | mojo/shell/application_manager_unittest.cc | 2 | ||||
-rw-r--r-- | mojo/shell/capability_filter_test.cc | 4 | ||||
-rw-r--r-- | mojo/shell/public/cpp/application_impl.h | 4 | ||||
-rw-r--r-- | mojo/shell/public/cpp/connection.h | 10 | ||||
-rw-r--r-- | mojo/shell/public/cpp/lib/application_impl.cc | 8 | ||||
-rw-r--r-- | mojo/shell/public/cpp/shell.h | 8 |
9 files changed, 19 insertions, 23 deletions
diff --git a/mojo/services/network/http_server_apptest.cc b/mojo/services/network/http_server_apptest.cc index ae1421a..aefc973 100644 --- a/mojo/services/network/http_server_apptest.cc +++ b/mojo/services/network/http_server_apptest.cc @@ -557,7 +557,7 @@ class HttpServerAppTest : public test::ApplicationTestBase { ApplicationTestBase::SetUp(); scoped_ptr<Connection> connection = - shell()->ConnectToApplication("mojo:network_service"); + shell()->Connect("mojo:network_service"); connection->ConnectToService(&network_service_); connection->ConnectToService(&web_socket_factory_); } diff --git a/mojo/services/tracing/public/cpp/tracing_impl.cc b/mojo/services/tracing/public/cpp/tracing_impl.cc index a340f75..3c61790 100644 --- a/mojo/services/tracing/public/cpp/tracing_impl.cc +++ b/mojo/services/tracing/public/cpp/tracing_impl.cc @@ -53,7 +53,7 @@ void TracingImpl::Initialize(Shell* shell, const std::string& url) { // up to something like CoreServices to name its own child threads. base::PlatformThread::SetName(url); - connection_ = shell->ConnectToApplication("mojo:tracing"); + connection_ = shell->Connect("mojo:tracing"); connection_->AddService(this); #ifdef NDEBUG diff --git a/mojo/shell/application_manager_apptest.cc b/mojo/shell/application_manager_apptest.cc index 5091d45..92c7272 100644 --- a/mojo/shell/application_manager_apptest.cc +++ b/mojo/shell/application_manager_apptest.cc @@ -174,7 +174,7 @@ TEST_F(ApplicationManagerAppTest, CreateInstanceForHandle) { // launches a process. #becauselinkerrors). mojo::shell::test::mojom::DriverPtr driver; scoped_ptr<Connection> connection = - shell()->ConnectToApplication("exe:application_manager_apptest_driver"); + shell()->Connect("exe:application_manager_apptest_driver"); connection->ConnectToService(&driver); // 2. Wait for the target to connect to us. (via diff --git a/mojo/shell/application_manager_unittest.cc b/mojo/shell/application_manager_unittest.cc index a673347..b83f320 100644 --- a/mojo/shell/application_manager_unittest.cc +++ b/mojo/shell/application_manager_unittest.cc @@ -250,7 +250,7 @@ class TestAImpl : public TestA { InterfaceRequest<TestA> request, InterfaceFactory<TestC>* factory) : test_context_(test_context), binding_(this, std::move(request)) { - connection_ = app_impl->ConnectToApplication(kTestBURLString); + connection_ = app_impl->Connect(kTestBURLString); connection_->AddService<TestC>(factory); connection_->ConnectToService(&b_); } diff --git a/mojo/shell/capability_filter_test.cc b/mojo/shell/capability_filter_test.cc index 4717bb6..7a97f68 100644 --- a/mojo/shell/capability_filter_test.cc +++ b/mojo/shell/capability_filter_test.cc @@ -172,12 +172,12 @@ bool TestApplication::AcceptConnection(Connection* connection) { // TestApplications receive their Validator via the inbound connection. connection->ConnectToService(&validator_); - connection1_ = shell_->ConnectToApplication("test:service"); + connection1_ = shell_->Connect("test:service"); connection1_->SetRemoteServiceProviderConnectionErrorHandler( base::Bind(&TestApplication::ConnectionClosed, base::Unretained(this), "test:service")); - connection2_ = shell_->ConnectToApplication("test:service2"); + connection2_ = shell_->Connect("test:service2"); connection2_->SetRemoteServiceProviderConnectionErrorHandler( base::Bind(&TestApplication::ConnectionClosed, base::Unretained(this), "test:service2")); diff --git a/mojo/shell/public/cpp/application_impl.h b/mojo/shell/public/cpp/application_impl.h index 5ade99f..9f35a0d 100644 --- a/mojo/shell/public/cpp/application_impl.h +++ b/mojo/shell/public/cpp/application_impl.h @@ -96,8 +96,8 @@ class ApplicationImpl : public Shell, public shell::mojom::Application { void WaitForInitialize(); // Shell. - scoped_ptr<Connection> ConnectToApplication(const std::string& url) override; - scoped_ptr<Connection> ConnectToApplication(ConnectParams* params) override; + scoped_ptr<Connection> Connect(const std::string& url) override; + scoped_ptr<Connection> Connect(ConnectParams* params) override; void Quit() override; scoped_ptr<AppRefCount> CreateAppRefCount() override; diff --git a/mojo/shell/public/cpp/connection.h b/mojo/shell/public/cpp/connection.h index 4be8669..a21657f 100644 --- a/mojo/shell/public/cpp/connection.h +++ b/mojo/shell/public/cpp/connection.h @@ -116,11 +116,11 @@ class Connection { const Closure& handler) = 0; // Returns the id of the remote application. For Connections created via - // ApplicationImpl::ConnectToApplication(), this will not be determined until - // ConnectToApplication()'s callback is run, and this function will return - // false. Use AddRemoteIDCallback() to schedule a callback to be run when the - // remote application id is available. A value of Shell::kInvalidApplicationID - // indicates no remote application connection has been established. + // Shell::Connect(), this will not be determined until Connect()'s callback is + // run, and this function will return false. Use AddRemoteIDCallback() to + // schedule a callback to be run when the remote application id is available. + // A value of Shell::kInvalidApplicationID indicates the connection has not + // been established. virtual bool GetRemoteApplicationID(uint32_t* remote_id) const = 0; // Returns the id of the deepest content handler used in connecting to diff --git a/mojo/shell/public/cpp/lib/application_impl.cc b/mojo/shell/public/cpp/lib/application_impl.cc index d51e5aa..132737f 100644 --- a/mojo/shell/public/cpp/lib/application_impl.cc +++ b/mojo/shell/public/cpp/lib/application_impl.cc @@ -62,15 +62,13 @@ void ApplicationImpl::WaitForInitialize() { binding_.WaitForIncomingMethodCall(); } -scoped_ptr<Connection> ApplicationImpl::ConnectToApplication( - const std::string& url) { +scoped_ptr<Connection> ApplicationImpl::Connect(const std::string& url) { ConnectParams params(url); params.set_filter(CreatePermissiveCapabilityFilter()); - return ConnectToApplication(¶ms); + return Connect(¶ms); } -scoped_ptr<Connection> ApplicationImpl::ConnectToApplication( - ConnectParams* params) { +scoped_ptr<Connection> ApplicationImpl::Connect(ConnectParams* params) { if (!shell_) return nullptr; DCHECK(params); diff --git a/mojo/shell/public/cpp/shell.h b/mojo/shell/public/cpp/shell.h index 1610693..104cc45 100644 --- a/mojo/shell/public/cpp/shell.h +++ b/mojo/shell/public/cpp/shell.h @@ -42,16 +42,14 @@ class Shell { // 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 takes ownership. - virtual scoped_ptr<Connection> ConnectToApplication( - const std::string& url) = 0; - virtual scoped_ptr<Connection> ConnectToApplication( - ConnectParams* params) = 0; + virtual scoped_ptr<Connection> Connect(const std::string& url) = 0; + virtual scoped_ptr<Connection> Connect(ConnectParams* params) = 0; // Connect to application identified by |request->url| and connect to the // service implementation of the interface identified by |Interface|. template <typename Interface> void ConnectToService(ConnectParams* params, InterfacePtr<Interface>* ptr) { - scoped_ptr<Connection> connection = ConnectToApplication(params); + scoped_ptr<Connection> connection = Connect(params); if (!connection.get()) return; connection->ConnectToService(ptr); |