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

Unified Diff: chrome/installer/setup/install.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
« no previous file with comments | « chrome/browser/google/google_update_settings_posix.cc ('k') | chrome/installer/setup/install_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install.cc
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index 4ec949118334360bd126918695b124b8ffd20df1..fa288164c4e7f1f41909eda97527830f96ab2b52 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -8,13 +8,13 @@
#include <shlobj.h>
#include <time.h>
+#include <memory>
#include <string>
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -134,7 +134,7 @@ void AddChromeToMediaPlayerList() {
reg_path.push_back(base::FilePath::kSeparators[0]);
reg_path.append(installer::kChromeExe);
VLOG(1) << "Adding Chrome to Media player list at " << reg_path;
- scoped_ptr<WorkItem> work_item(WorkItem::CreateCreateRegKeyWorkItem(
+ std::unique_ptr<WorkItem> work_item(WorkItem::CreateCreateRegKeyWorkItem(
HKEY_LOCAL_MACHINE, reg_path, WorkItem::kWow64Default));
// if the operation fails we log the error but still continue
@@ -184,7 +184,7 @@ installer::InstallStatus InstallNewVersion(
const base::FilePath& src_path,
const base::FilePath& temp_path,
const Version& new_version,
- scoped_ptr<Version>* current_version) {
+ std::unique_ptr<Version>* current_version) {
DCHECK(current_version);
installer_state.UpdateStage(installer::BUILDING);
@@ -192,7 +192,7 @@ installer::InstallStatus InstallNewVersion(
current_version->reset(installer_state.GetCurrentVersion(original_state));
installer::SetCurrentVersionCrashKey(current_version->get());
- scoped_ptr<WorkItemList> install_list(WorkItem::CreateWorkItemList());
+ std::unique_ptr<WorkItemList> install_list(WorkItem::CreateWorkItemList());
AddInstallWorkItems(original_state,
installer_state,
@@ -581,7 +581,7 @@ InstallStatus InstallOrUpdateProduct(
installer_state.UpdateStage(installer::CREATING_VISUAL_MANIFEST);
CreateVisualElementsManifest(src_path, new_version);
- scoped_ptr<Version> existing_version;
+ std::unique_ptr<Version> existing_version;
InstallStatus result = InstallNewVersion(original_state, installer_state,
setup_path, archive_path, src_path, install_temp_path, new_version,
&existing_version);
@@ -705,7 +705,7 @@ void HandleOsUpgradeForBrowser(const installer::InstallerState& installer_state,
// TODO(gab): This should really perform all registry only update steps (i.e.,
// something between InstallOrUpdateProduct and AddActiveSetupWorkItems, but
// this takes care of what is most required for now).
- scoped_ptr<WorkItemList> work_item_list(WorkItem::CreateWorkItemList());
+ std::unique_ptr<WorkItemList> work_item_list(WorkItem::CreateWorkItemList());
AddActiveSetupWorkItems(installer_state, installed_version, chrome,
work_item_list.get());
if (!work_item_list->Do()) {
« no previous file with comments | « chrome/browser/google/google_update_settings_posix.cc ('k') | chrome/installer/setup/install_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698