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

Unified Diff: services/shell/public/cpp/shell_test.h

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
Index: services/shell/public/cpp/shell_test.h
diff --git a/services/shell/public/cpp/shell_test.h b/services/shell/public/cpp/shell_test.h
index dcbd9fb893dd4ca6964a75dfe57f8678605829a2..b299297a4c9af8969f5ee0377a49afdcc88f5d0d 100644
--- a/services/shell/public/cpp/shell_test.h
+++ b/services/shell/public/cpp/shell_test.h
@@ -5,8 +5,9 @@
#ifndef SERVICES_SHELL_PUBLIC_CPP_SHELL_TEST_H_
#define SERVICES_SHELL_PUBLIC_CPP_SHELL_TEST_H_
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "services/shell/public/cpp/connector.h"
#include "services/shell/public/cpp/shell_client.h"
#include "services/shell/public/cpp/shell_connection.h"
@@ -16,10 +17,10 @@ namespace base {
class MessageLoop;
}
-namespace mojo {
namespace shell {
+
class BackgroundShell;
-}
+
namespace test {
class ShellTest;
@@ -28,7 +29,7 @@ class ShellTest;
// to customize this should subclass this class instead of ShellClient,
// otherwise they will have to call ShellTest::InitializeCalled() to forward
// metadata from Initialize() to the test.
-class ShellTestClient : public mojo::ShellClient {
+class ShellTestClient : public ShellClient {
public:
explicit ShellTestClient(ShellTest* test);
~ShellTestClient() override;
@@ -69,9 +70,9 @@ class ShellTest : public testing::Test {
// via Initialize(). Override to customize, but custom implementations must
// call InitializeCalled() to forward the metadata so test_name() etc all
// work.
- virtual scoped_ptr<ShellClient> CreateShellClient();
+ virtual std::unique_ptr<ShellClient> CreateShellClient();
- virtual scoped_ptr<base::MessageLoop> CreateMessageLoop();
+ virtual std::unique_ptr<base::MessageLoop> CreateMessageLoop();
// Call to set Initialize() metadata when GetShellClient() is overridden.
void InitializeCalled(Connector* connector,
@@ -86,11 +87,11 @@ class ShellTest : public testing::Test {
private:
friend ShellTestClient;
- scoped_ptr<ShellClient> shell_client_;
+ std::unique_ptr<ShellClient> shell_client_;
- scoped_ptr<base::MessageLoop> message_loop_;
- scoped_ptr<shell::BackgroundShell> background_shell_;
- scoped_ptr<ShellConnection> shell_connection_;
+ std::unique_ptr<base::MessageLoop> message_loop_;
+ std::unique_ptr<BackgroundShell> background_shell_;
+ std::unique_ptr<ShellConnection> shell_connection_;
// See constructor.
std::string test_name_;
@@ -106,6 +107,6 @@ class ShellTest : public testing::Test {
};
} // namespace test
-} // namespace mojo
+} // namespace shell
#endif // SERVICES_SHELL_PUBLIC_CPP_SHELL_TEST_H_
« no previous file with comments | « services/shell/public/cpp/shell_connection.h ('k') | services/shell/public/cpp/tests/interface_registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698