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

Unified Diff: chrome/installer/util/shell_util.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/shell_util.cc
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 493437069534a68ed69211c1ef0bdf93639862a0..202d8716381ad6b28dd97721e94f13e3d46e48ef 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -14,6 +14,7 @@
#include <shobjidl.h>
#include <limits>
+#include <memory>
#include <string>
#include "base/bind.h"
@@ -25,7 +26,6 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/md5.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/metrics/sparse_histogram.h"
#include "base/path_service.h"
@@ -540,7 +540,7 @@ void GetAppDefaultRegistrationEntries(const base::string16& prog_id,
base::string16 key_name(ShellUtil::kRegClasses);
key_name.push_back(base::FilePath::kSeparators[0]);
key_name.append(ext);
- scoped_ptr<RegistryEntry> default_association(
+ std::unique_ptr<RegistryEntry> default_association(
new RegistryEntry(key_name, prog_id));
if (overwrite_existing ||
!default_association->KeyExistsInRegistry(RegistryEntry::LOOK_IN_HKCU)) {
@@ -2334,7 +2334,7 @@ bool ShellUtil::DeleteFileAssociations(const base::string16& prog_id) {
// static
bool ShellUtil::AddRegistryEntries(HKEY root,
const ScopedVector<RegistryEntry>& entries) {
- scoped_ptr<WorkItemList> items(WorkItem::CreateWorkItemList());
+ std::unique_ptr<WorkItemList> items(WorkItem::CreateWorkItemList());
for (ScopedVector<RegistryEntry>::const_iterator itr = entries.begin();
itr != entries.end(); ++itr)
« no previous file with comments | « chrome/installer/util/set_reg_value_work_item_unittest.cc ('k') | chrome/installer/util/shell_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698