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

Unified Diff: ui/views/mus/views_mus_test_suite.cc

Issue 2374883002: views/mus: Change 'reset(new' to base::MakeUnqiue. (Closed)
Patch Set: Created 4 years, 3 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 | « ui/views/mus/pointer_watcher_event_router_unittest.cc ('k') | ui/views/mus/window_manager_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/views_mus_test_suite.cc
diff --git a/ui/views/mus/views_mus_test_suite.cc b/ui/views/mus/views_mus_test_suite.cc
index 701ea56a65021d0ab3a729c70da62b42fe13334a..bf630302dd191b9172d09d1b27b2fccfffaf1b3f 100644
--- a/ui/views/mus/views_mus_test_suite.cc
+++ b/ui/views/mus/views_mus_test_suite.cc
@@ -5,6 +5,7 @@
#include "ui/views/mus/views_mus_test_suite.h"
#include <memory>
+#include <string>
#include "base/command_line.h"
#include "base/files/file_path.h"
@@ -33,7 +34,7 @@ void EnsureCommandLineSwitch(const std::string& name) {
class DefaultService : public shell::Service {
public:
- DefaultService() {}
+ DefaultService() {}
~DefaultService() override {}
private:
@@ -114,12 +115,11 @@ class ShellConnection {
}
void SetUpConnections(base::WaitableEvent* wait) {
- background_shell_.reset(new shell::BackgroundShell);
+ background_shell_ = base::MakeUnique<shell::BackgroundShell>();
background_shell_->Init(nullptr);
- service_.reset(new DefaultService);
- shell_connection_.reset(new shell::ServiceContext(
- service_.get(),
- background_shell_->CreateServiceRequest(GetTestName())));
+ service_ = base::MakeUnique<DefaultService>();
+ shell_connection_ = base::MakeUnique<shell::ServiceContext>(
+ service_.get(), background_shell_->CreateServiceRequest(GetTestName()));
// ui/views/mus requires a WindowManager running, so launch test_wm.
shell::Connector* connector = shell_connection_->connector();
@@ -166,7 +166,7 @@ void ViewsMusTestSuite::Initialize() {
EnsureCommandLineSwitch(ui::switches::kUseTestConfig);
ViewsTestSuite::Initialize();
- shell_connections_.reset(new ShellConnection);
+ shell_connections_ = base::MakeUnique<ShellConnection>();
}
void ViewsMusTestSuite::Shutdown() {
« no previous file with comments | « ui/views/mus/pointer_watcher_event_router_unittest.cc ('k') | ui/views/mus/window_manager_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698