Replace base::MakeUnique with std::make_unique in components/ - 1
If file doesn't use base::WrapUnique, base/memory/ptr_util.h includes
are changed to <memory>.
Bug: 755727
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I544c5037c1f1a4d9b3e1eb37ff6398ebbad2da39
Reviewed-on: https://chromium-review.googlesource.com/866616
Commit-Queue: Gyuyoung Kim <[email protected]>
Reviewed-by: Colin Blundell <[email protected]>
Reviewed-by: Doug Steedman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#530499}
diff --git a/components/component_updater/component_installer_unittest.cc b/components/component_updater/component_installer_unittest.cc
index c558149..476ed96a 100644
--- a/components/component_updater/component_installer_unittest.cc
+++ b/components/component_updater/component_installer_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <iterator>
+#include <memory>
#include <string>
#include <utility>
#include <vector>
@@ -12,7 +13,6 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/macros.h"
-#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/path_service.h"
#include "base/run_loop.h"
@@ -204,7 +204,7 @@
ComponentInstallerTest::ComponentInstallerTest() {
EXPECT_CALL(update_client(), AddObserver(_)).Times(1);
component_updater_ =
- base::MakeUnique<CrxUpdateService>(config_, update_client_);
+ std::make_unique<CrxUpdateService>(config_, update_client_);
}
ComponentInstallerTest::~ComponentInstallerTest() {
@@ -272,7 +272,7 @@
EXPECT_CALL(update_client(), Stop()).Times(1);
auto installer = base::MakeRefCounted<ComponentInstaller>(
- base::MakeUnique<FakeInstallerPolicy>());
+ std::make_unique<FakeInstallerPolicy>());
installer->Register(component_updater(), base::OnceClosure());
RunThreads();
@@ -299,7 +299,7 @@
// Tests that the unpack path is removed when the install succeeded.
TEST_F(ComponentInstallerTest, UnpackPathInstallSuccess) {
auto installer = base::MakeRefCounted<ComponentInstaller>(
- base::MakeUnique<FakeInstallerPolicy>());
+ std::make_unique<FakeInstallerPolicy>());
Unpack(test_file("jebgalgnebhfojomionfpkfelancnnkf.crx"));
@@ -327,7 +327,7 @@
// Tests that the unpack path is removed when the install failed.
TEST_F(ComponentInstallerTest, UnpackPathInstallError) {
auto installer = base::MakeRefCounted<ComponentInstaller>(
- base::MakeUnique<FakeInstallerPolicy>());
+ std::make_unique<FakeInstallerPolicy>());
Unpack(test_file("jebgalgnebhfojomionfpkfelancnnkf.crx"));