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

Unified Diff: services/shell/public/cpp/lib/shell_test.cc

Issue 2118083002: ShellClient -> Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus2
Patch Set: . Created 4 years, 5 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 | « services/shell/public/cpp/lib/shell_connection_ref.cc ('k') | services/shell/public/cpp/names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/lib/shell_test.cc
diff --git a/services/shell/public/cpp/lib/shell_test.cc b/services/shell/public/cpp/lib/shell_test.cc
index 31f290fb2daaaa51985ecc153b6311906a49c125..6f4f1a7c0126a663408035482f54947abe187170 100644
--- a/services/shell/public/cpp/lib/shell_test.cc
+++ b/services/shell/public/cpp/lib/shell_test.cc
@@ -8,7 +8,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "services/shell/background/background_shell.h"
-#include "services/shell/public/cpp/shell_client.h"
+#include "services/shell/public/cpp/service.h"
namespace shell {
namespace test {
@@ -16,9 +16,9 @@ namespace test {
ShellTestClient::ShellTestClient(ShellTest* test) : test_(test) {}
ShellTestClient::~ShellTestClient() {}
-void ShellTestClient::Initialize(Connector* connector, const Identity& identity,
- uint32_t id) {
- test_->InitializeCalled(connector, identity.name(), identity.user_id(), id);
+void ShellTestClient::OnStart(Connector* connector, const Identity& identity,
+ uint32_t id) {
+ test_->OnStartCalled(connector, identity.name(), identity.user_id(), id);
}
ShellTest::ShellTest() {}
@@ -30,7 +30,7 @@ void ShellTest::InitTestName(const std::string& test_name) {
test_name_ = test_name;
}
-std::unique_ptr<ShellClient> ShellTest::CreateShellClient() {
+std::unique_ptr<Service> ShellTest::CreateService() {
return base::WrapUnique(new ShellTestClient(this));
}
@@ -38,10 +38,10 @@ std::unique_ptr<base::MessageLoop> ShellTest::CreateMessageLoop() {
return base::WrapUnique(new base::MessageLoop);
}
-void ShellTest::InitializeCalled(Connector* connector,
- const std::string& name,
- const std::string& user_id,
- uint32_t id) {
+void ShellTest::OnStartCalled(Connector* connector,
+ const std::string& name,
+ const std::string& user_id,
+ uint32_t id) {
DCHECK_EQ(connector_, connector);
initialize_name_ = name;
initialize_instance_id_ = id;
@@ -50,21 +50,21 @@ void ShellTest::InitializeCalled(Connector* connector,
}
void ShellTest::SetUp() {
- shell_client_ = CreateShellClient();
+ service_ = CreateService();
message_loop_ = CreateMessageLoop();
background_shell_.reset(new shell::BackgroundShell);
background_shell_->Init(nullptr);
// Create the shell connection. We don't proceed until we get our
- // ShellClient's Initialize() method is called.
+ // Service's OnStart() method is called.
base::RunLoop run_loop;
base::MessageLoop::ScopedNestableTaskAllower allow(
base::MessageLoop::current());
initialize_called_ = run_loop.QuitClosure();
shell_connection_.reset(new ShellConnection(
- shell_client_.get(),
- background_shell_->CreateShellClientRequest(test_name_)));
+ service_.get(),
+ background_shell_->CreateServiceRequest(test_name_)));
connector_ = shell_connection_->connector();
run_loop.Run();
@@ -74,7 +74,7 @@ void ShellTest::TearDown() {
shell_connection_.reset();
background_shell_.reset();
message_loop_.reset();
- shell_client_.reset();
+ service_.reset();
}
} // namespace test
« no previous file with comments | « services/shell/public/cpp/lib/shell_connection_ref.cc ('k') | services/shell/public/cpp/names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698