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

Side by Side Diff: chrome/installer/setup/install_worker_unittest.cc

Issue 1976443005: Revert of Add best-effort/allow rollback flags on WorkItem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simple_list_tests
Patch Set: Created 4 years, 7 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/setup/install_worker.cc ('k') | chrome/installer/setup/setup_main.cc » ('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/setup/install_worker.h" 5 #include "chrome/installer/setup/install_worker.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/version.h" 10 #include "base/version.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 CopyOverWriteOption, 59 CopyOverWriteOption,
60 const std::wstring&)); 60 const std::wstring&));
61 MOCK_METHOD1(AddCreateDirWorkItem, WorkItem* (const base::FilePath&)); 61 MOCK_METHOD1(AddCreateDirWorkItem, WorkItem* (const base::FilePath&));
62 MOCK_METHOD3(AddCreateRegKeyWorkItem, 62 MOCK_METHOD3(AddCreateRegKeyWorkItem,
63 WorkItem*(HKEY, const std::wstring&, REGSAM)); 63 WorkItem*(HKEY, const std::wstring&, REGSAM));
64 MOCK_METHOD3(AddDeleteRegKeyWorkItem, 64 MOCK_METHOD3(AddDeleteRegKeyWorkItem,
65 WorkItem*(HKEY, const std::wstring&, REGSAM)); 65 WorkItem*(HKEY, const std::wstring&, REGSAM));
66 MOCK_METHOD4( 66 MOCK_METHOD4(
67 AddDeleteRegValueWorkItem, 67 AddDeleteRegValueWorkItem,
68 WorkItem*(HKEY, const std::wstring&, REGSAM, const std::wstring&)); 68 WorkItem*(HKEY, const std::wstring&, REGSAM, const std::wstring&));
69 MOCK_METHOD3(AddDeleteTreeWorkItem,
70 WorkItem*(const base::FilePath&,
71 const base::FilePath&,
72 const std::vector<base::FilePath>&));
69 MOCK_METHOD2(AddDeleteTreeWorkItem, 73 MOCK_METHOD2(AddDeleteTreeWorkItem,
70 WorkItem*(const base::FilePath&, const base::FilePath&)); 74 WorkItem*(const base::FilePath&, const base::FilePath&));
71 MOCK_METHOD4(AddMoveTreeWorkItem, 75 MOCK_METHOD4(AddMoveTreeWorkItem,
72 WorkItem*(const std::wstring&, 76 WorkItem*(const std::wstring&,
73 const std::wstring&, 77 const std::wstring&,
74 const std::wstring&, 78 const std::wstring&,
75 MoveTreeOption)); 79 MoveTreeOption));
76 // Workaround for gmock problems with disambiguating between string pointers 80 // Workaround for gmock problems with disambiguating between string pointers
77 // and DWORD. 81 // and DWORD.
78 virtual WorkItem* AddSetRegValueWorkItem(HKEY a1, 82 virtual WorkItem* AddSetRegValueWorkItem(HKEY a1,
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 456
453 const HKEY kRegRoot = system_level ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; 457 const HKEY kRegRoot = system_level ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
454 static const wchar_t kRegKeyPath[] = L"Software\\Chromium\\test"; 458 static const wchar_t kRegKeyPath[] = L"Software\\Chromium\\test";
455 std::unique_ptr<CreateRegKeyWorkItem> create_reg_key_work_item( 459 std::unique_ptr<CreateRegKeyWorkItem> create_reg_key_work_item(
456 WorkItem::CreateCreateRegKeyWorkItem(kRegRoot, kRegKeyPath, 460 WorkItem::CreateCreateRegKeyWorkItem(kRegRoot, kRegKeyPath,
457 WorkItem::kWow64Default)); 461 WorkItem::kWow64Default));
458 std::unique_ptr<SetRegValueWorkItem> set_reg_value_work_item( 462 std::unique_ptr<SetRegValueWorkItem> set_reg_value_work_item(
459 WorkItem::CreateSetRegValueWorkItem( 463 WorkItem::CreateSetRegValueWorkItem(
460 kRegRoot, kRegKeyPath, WorkItem::kWow64Default, L"", L"", false)); 464 kRegRoot, kRegKeyPath, WorkItem::kWow64Default, L"", L"", false));
461 std::unique_ptr<DeleteTreeWorkItem> delete_tree_work_item( 465 std::unique_ptr<DeleteTreeWorkItem> delete_tree_work_item(
462 WorkItem::CreateDeleteTreeWorkItem(base::FilePath(), base::FilePath())); 466 WorkItem::CreateDeleteTreeWorkItem(base::FilePath(), base::FilePath(),
467 std::vector<base::FilePath>()));
463 std::unique_ptr<DeleteRegKeyWorkItem> delete_reg_key_work_item( 468 std::unique_ptr<DeleteRegKeyWorkItem> delete_reg_key_work_item(
464 WorkItem::CreateDeleteRegKeyWorkItem(kRegRoot, kRegKeyPath, 469 WorkItem::CreateDeleteRegKeyWorkItem(kRegRoot, kRegKeyPath,
465 WorkItem::kWow64Default)); 470 WorkItem::kWow64Default));
466 471
467 std::unique_ptr<InstallationState> installation_state( 472 std::unique_ptr<InstallationState> installation_state(
468 BuildChromeInstallationState(system_level, multi_install)); 473 BuildChromeInstallationState(system_level, multi_install));
469 474
470 std::unique_ptr<InstallerState> installer_state(BuildChromeInstallerState( 475 std::unique_ptr<InstallerState> installer_state(BuildChromeInstallerState(
471 system_level, multi_install, *installation_state, 476 system_level, multi_install, *installation_state,
472 InstallerState::SINGLE_INSTALL_OR_UPDATE)); 477 InstallerState::SINGLE_INSTALL_OR_UPDATE));
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 prod_type_list[i_type_check]); 826 prod_type_list[i_type_check]);
822 bool prod_expect = (mach_after & (1 << i_type_check)) != 0; 827 bool prod_expect = (mach_after & (1 << i_type_check)) != 0;
823 EXPECT_EQ(prod_expect, prod_res); 828 EXPECT_EQ(prod_expect, prod_res);
824 } 829 }
825 } 830 }
826 } 831 }
827 } 832 }
828 } 833 }
829 834
830 #endif // defined(GOOGLE_CHROME_BUILD) 835 #endif // defined(GOOGLE_CHROME_BUILD)
OLDNEW
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698