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

Unified Diff: mojo/services/test_service/test_service_impl.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
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/services/test_service/test_service_impl.h ('k') | mojo/services/test_service/test_time_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/test_service/test_service_impl.cc
diff --git a/mojo/services/test_service/test_service_impl.cc b/mojo/services/test_service/test_service_impl.cc
index 3429e0c0de6d616e486c7dd21d5135f95ab4edc1..6243407f3c8ee49e843605491f18b6afe79814ac 100644
--- a/mojo/services/test_service/test_service_impl.cc
+++ b/mojo/services/test_service/test_service_impl.cc
@@ -14,16 +14,16 @@
#include "mojo/services/test_service/test_service_application.h"
#include "mojo/services/test_service/test_time_service_impl.h"
#include "mojo/services/test_service/tracked_service.h"
-#include "mojo/shell/public/cpp/application_impl.h"
+#include "mojo/shell/public/cpp/shell.h"
namespace mojo {
namespace test {
-TestServiceImpl::TestServiceImpl(ApplicationImpl* app_impl,
+TestServiceImpl::TestServiceImpl(Shell* shell,
TestServiceApplication* application,
InterfaceRequest<TestService> request)
: application_(application),
- app_impl_(app_impl),
+ shell_(shell),
binding_(this, std::move(request)) {
binding_.set_connection_error_handler(
[this]() { application_->ReleaseRef(); });
@@ -47,7 +47,7 @@ void SendTimeResponse(
void TestServiceImpl::ConnectToAppAndGetTime(
const mojo::String& app_url,
const mojo::Callback<void(int64_t)>& callback) {
- app_impl_->ConnectToService(app_url.get(), &time_service_);
+ shell_->ConnectToService(app_url.get(), &time_service_);
if (tracking_) {
tracking_->RecordNewRequest();
time_service_->StartTrackingRequests(mojo::Callback<void()>());
@@ -58,7 +58,7 @@ void TestServiceImpl::ConnectToAppAndGetTime(
void TestServiceImpl::StartTrackingRequests(
const mojo::Callback<void()>& callback) {
TestRequestTrackerPtr tracker;
- app_impl_->ConnectToService("mojo:test_request_tracker_app", &tracker);
+ shell_->ConnectToService("mojo:test_request_tracker_app", &tracker);
tracking_.reset(new TrackedService(std::move(tracker), Name_, callback));
}
« no previous file with comments | « mojo/services/test_service/test_service_impl.h ('k') | mojo/services/test_service/test_time_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698