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

Unified Diff: chrome/installer/setup/setup_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
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/setup/setup_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/setup_util.cc
diff --git a/chrome/installer/setup/setup_util.cc b/chrome/installer/setup/setup_util.cc
index 3a27b2247f6f945b308b6664cdc6fccd4a6f3192..93826c86ad0c1409b7639320db0e7341c990d2e2 100644
--- a/chrome/installer/setup/setup_util.cc
+++ b/chrome/installer/setup/setup_util.cc
@@ -103,14 +103,14 @@ Version* GetMaxVersionFromArchiveDir(const base::FilePath& chrome_path) {
// TODO(tommi): The version directory really should match the version of
// setup.exe. To begin with, we should at least DCHECK that that's true.
- scoped_ptr<Version> max_version(new Version("0.0.0.0"));
+ std::unique_ptr<Version> max_version(new Version("0.0.0.0"));
bool version_found = false;
while (!version_enum.Next().empty()) {
base::FileEnumerator::FileInfo find_data = version_enum.GetInfo();
VLOG(1) << "directory found: " << find_data.GetName().value();
- scoped_ptr<Version> found_version(
+ std::unique_ptr<Version> found_version(
new Version(base::UTF16ToASCII(find_data.GetName().value())));
if (found_version->IsValid() &&
found_version->CompareTo(*max_version.get()) > 0) {
@@ -144,7 +144,7 @@ base::FilePath FindArchiveToPatch(const InstallationState& original_state,
if (base::PathExists(patch_source))
return patch_source;
}
- scoped_ptr<Version> version(
+ std::unique_ptr<Version> version(
installer::GetMaxVersionFromArchiveDir(installer_state.target_path()));
if (version) {
patch_source = installer_state.GetInstallerDirectory(*version)
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/setup/setup_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698