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

Unified Diff: chrome/installer/util/delete_reg_value_work_item_unittest.cc

Issue 1878313003: Convert //chrome/installer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert decompress.cc in mini_installer. 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: chrome/installer/util/delete_reg_value_work_item_unittest.cc
diff --git a/chrome/installer/util/delete_reg_value_work_item_unittest.cc b/chrome/installer/util/delete_reg_value_work_item_unittest.cc
index 5fea168c6fe123ef162d12d528f07626f5653300..55ce612cf4e51d4384168bb1a062ee150a3bee63 100644
--- a/chrome/installer/util/delete_reg_value_work_item_unittest.cc
+++ b/chrome/installer/util/delete_reg_value_work_item_unittest.cc
@@ -2,14 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/installer/util/delete_reg_value_work_item.h"
+
#include <windows.h>
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "base/test/test_reg_util_win.h"
#include "base/win/registry.h"
-#include "chrome/installer/util/delete_reg_value_work_item.h"
#include "chrome/installer/util/work_item.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -52,13 +54,13 @@ TEST_F(DeleteRegValueWorkItemTest, DeleteExistingValue) {
ASSERT_EQ(ERROR_SUCCESS,
RegSetValueEx(key.Handle(), kNameEmpty, NULL, REG_SZ, NULL, 0));
- scoped_ptr<DeleteRegValueWorkItem> work_item1(
+ std::unique_ptr<DeleteRegValueWorkItem> work_item1(
WorkItem::CreateDeleteRegValueWorkItem(
HKEY_CURRENT_USER, kTestKey, WorkItem::kWow64Default, kNameStr));
- scoped_ptr<DeleteRegValueWorkItem> work_item2(
+ std::unique_ptr<DeleteRegValueWorkItem> work_item2(
WorkItem::CreateDeleteRegValueWorkItem(
HKEY_CURRENT_USER, kTestKey, WorkItem::kWow64Default, kNameDword));
- scoped_ptr<DeleteRegValueWorkItem> work_item3(
+ std::unique_ptr<DeleteRegValueWorkItem> work_item3(
WorkItem::CreateDeleteRegValueWorkItem(
HKEY_CURRENT_USER, kTestKey, WorkItem::kWow64Default, kNameEmpty));
@@ -105,10 +107,10 @@ TEST_F(DeleteRegValueWorkItemTest, DeleteNonExistentValue) {
EXPECT_FALSE(key.HasValue(kNameStr));
EXPECT_FALSE(key.HasValue(kNameDword));
- scoped_ptr<DeleteRegValueWorkItem> work_item1(
+ std::unique_ptr<DeleteRegValueWorkItem> work_item1(
WorkItem::CreateDeleteRegValueWorkItem(
HKEY_CURRENT_USER, kTestKey, WorkItem::kWow64Default, kNameStr));
- scoped_ptr<DeleteRegValueWorkItem> work_item2(
+ std::unique_ptr<DeleteRegValueWorkItem> work_item2(
WorkItem::CreateDeleteRegValueWorkItem(
HKEY_CURRENT_USER, kTestKey, WorkItem::kWow64Default, kNameDword));
@@ -132,10 +134,10 @@ TEST_F(DeleteRegValueWorkItemTest, DeleteValueInNonExistentKey) {
ASSERT_EQ(ERROR_FILE_NOT_FOUND,
key.Open(HKEY_CURRENT_USER, kTestKey, KEY_READ));
- scoped_ptr<DeleteRegValueWorkItem> work_item1(
+ std::unique_ptr<DeleteRegValueWorkItem> work_item1(
WorkItem::CreateDeleteRegValueWorkItem(
HKEY_CURRENT_USER, kTestKey, WorkItem::kWow64Default, kNameStr));
- scoped_ptr<DeleteRegValueWorkItem> work_item2(
+ std::unique_ptr<DeleteRegValueWorkItem> work_item2(
WorkItem::CreateDeleteRegValueWorkItem(
HKEY_CURRENT_USER, kTestKey, WorkItem::kWow64Default, kNameDword));
« no previous file with comments | « chrome/installer/util/delete_reg_key_work_item_unittest.cc ('k') | chrome/installer/util/delete_tree_work_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698