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

Side by Side Diff: chrome/installer/util/delete_old_versions_unittest.cc

Issue 2321573002: //chrome misc: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Fix Win compilation Created 4 years, 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/delete_old_versions.h" 5 #include "chrome/installer/util/delete_old_versions.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/files/file_enumerator.h" 10 #include "base/files/file_enumerator.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 FilePathSet* file_path_set) { 88 FilePathSet* file_path_set) {
89 file_path_set->insert(base::FilePath(version)); 89 file_path_set->insert(base::FilePath(version));
90 file_path_set->insert(base::FilePath(version).Append(L"chrome.dll")); 90 file_path_set->insert(base::FilePath(version).Append(L"chrome.dll"));
91 file_path_set->insert(base::FilePath(version).Append(L"nacl64.exe")); 91 file_path_set->insert(base::FilePath(version).Append(L"nacl64.exe"));
92 file_path_set->insert(base::FilePath(version).Append(L"icudtl.dat")); 92 file_path_set->insert(base::FilePath(version).Append(L"icudtl.dat"));
93 file_path_set->insert(base::FilePath(version).Append(L"Installer")); 93 file_path_set->insert(base::FilePath(version).Append(L"Installer"));
94 file_path_set->insert( 94 file_path_set->insert(
95 base::FilePath(version).Append(L"Installer\\setup.exe")); 95 base::FilePath(version).Append(L"Installer\\setup.exe"));
96 } 96 }
97 97
98 base::FilePath install_dir() const { return install_dir_.path(); } 98 base::FilePath install_dir() const { return install_dir_.GetPath(); }
99 99
100 private: 100 private:
101 base::ScopedTempDir install_dir_; 101 base::ScopedTempDir install_dir_;
102 102
103 DISALLOW_COPY_AND_ASSIGN(DeleteOldVersionsTest); 103 DISALLOW_COPY_AND_ASSIGN(DeleteOldVersionsTest);
104 }; 104 };
105 105
106 } // namespace 106 } // namespace
107 107
108 // An old executable without a matching directory should be deleted. 108 // An old executable without a matching directory should be deleted.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 278
279 DeleteOldVersions(install_dir()); 279 DeleteOldVersions(install_dir());
280 280
281 FilePathSet expected_install_dir_content; 281 FilePathSet expected_install_dir_content;
282 expected_install_dir_content.insert(base::FilePath(installer::kChromeExe)); 282 expected_install_dir_content.insert(base::FilePath(installer::kChromeExe));
283 AddVersionFiles(version_b, &expected_install_dir_content); 283 AddVersionFiles(version_b, &expected_install_dir_content);
284 EXPECT_EQ(expected_install_dir_content, GetInstallDirContent()); 284 EXPECT_EQ(expected_install_dir_content, GetInstallDirContent());
285 } 285 }
286 286
287 } // namespace installer 287 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/create_dir_work_item_unittest.cc ('k') | chrome/installer/util/delete_tree_work_item_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698