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

Side by Side Diff: chrome/installer/util/install_util_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 unified diff | Download patch
« no previous file with comments | « chrome/installer/util/install_util.cc ('k') | chrome/installer/util/installation_state.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/installer/util/install_util.h" 5 #include "chrome/installer/util/install_util.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 void ResetRegistryOverrides() { 44 void ResetRegistryOverrides() {
45 registry_override_manager_.reset( 45 registry_override_manager_.reset(
46 new registry_util::RegistryOverrideManager); 46 new registry_util::RegistryOverrideManager);
47 registry_override_manager_->OverrideRegistry(HKEY_CURRENT_USER); 47 registry_override_manager_->OverrideRegistry(HKEY_CURRENT_USER);
48 registry_override_manager_->OverrideRegistry(HKEY_LOCAL_MACHINE); 48 registry_override_manager_->OverrideRegistry(HKEY_LOCAL_MACHINE);
49 } 49 }
50 50
51 private: 51 private:
52 scoped_ptr<registry_util::RegistryOverrideManager> registry_override_manager_; 52 std::unique_ptr<registry_util::RegistryOverrideManager>
53 registry_override_manager_;
53 54
54 DISALLOW_COPY_AND_ASSIGN(InstallUtilTest); 55 DISALLOW_COPY_AND_ASSIGN(InstallUtilTest);
55 }; 56 };
56 57
57 TEST_F(InstallUtilTest, ComposeCommandLine) { 58 TEST_F(InstallUtilTest, ComposeCommandLine) {
58 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); 59 base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
59 60
60 std::pair<std::wstring, std::wstring> params[] = { 61 std::pair<std::wstring, std::wstring> params[] = {
61 std::make_pair(std::wstring(L""), std::wstring(L"")), 62 std::make_pair(std::wstring(L""), std::wstring(L"")),
62 std::make_pair(std::wstring(L""), std::wstring(L"--do-something --silly")), 63 std::make_pair(std::wstring(L""), std::wstring(L"--do-something --silly")),
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 #if defined(_WIN64) 513 #if defined(_WIN64)
513 const int kOtherProgramFilesKey = base::DIR_PROGRAM_FILES; 514 const int kOtherProgramFilesKey = base::DIR_PROGRAM_FILES;
514 base::ScopedPathOverride other_program_files_override(kOtherProgramFilesKey); 515 base::ScopedPathOverride other_program_files_override(kOtherProgramFilesKey);
515 ASSERT_TRUE(PathService::Get(kOtherProgramFilesKey, &some_exe)); 516 ASSERT_TRUE(PathService::Get(kOtherProgramFilesKey, &some_exe));
516 some_exe = some_exe.AppendASCII("Company") 517 some_exe = some_exe.AppendASCII("Company")
517 .AppendASCII("Product") 518 .AppendASCII("Product")
518 .AppendASCII("product.exe"); 519 .AppendASCII("product.exe");
519 EXPECT_TRUE(InstallUtil::IsPerUserInstall(some_exe)); 520 EXPECT_TRUE(InstallUtil::IsPerUserInstall(some_exe));
520 #endif // defined(_WIN64) 521 #endif // defined(_WIN64)
521 } 522 }
OLDNEW
« no previous file with comments | « chrome/installer/util/install_util.cc ('k') | chrome/installer/util/installation_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698