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

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

Issue 19052005: Move PathIsWritable, DirectoryExists, ContentsEqual, and TextContentsEqual to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
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 // This file defines the methods useful for uninstalling Chrome. 5 // This file defines the methods useful for uninstalling Chrome.
6 6
7 #include "chrome/installer/setup/uninstall.h" 7 #include "chrome/installer/setup/uninstall.h"
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 namespace { 57 namespace {
58 58
59 // Avoid leaving behind a Temp dir. If one exists, ask SelfCleaningTempDir to 59 // Avoid leaving behind a Temp dir. If one exists, ask SelfCleaningTempDir to
60 // clean it up for us. This may involve scheduling it for deletion after 60 // clean it up for us. This may involve scheduling it for deletion after
61 // reboot. Don't report that a reboot is required in this case, however. 61 // reboot. Don't report that a reboot is required in this case, however.
62 // TODO(erikwright): Shouldn't this still lead to 62 // TODO(erikwright): Shouldn't this still lead to
63 // ScheduleParentAndGrandparentForDeletion? 63 // ScheduleParentAndGrandparentForDeletion?
64 void DeleteInstallTempDir(const base::FilePath& target_path) { 64 void DeleteInstallTempDir(const base::FilePath& target_path) {
65 base::FilePath temp_path(target_path.DirName().Append( 65 base::FilePath temp_path(target_path.DirName().Append(
66 installer::kInstallTempDir)); 66 installer::kInstallTempDir));
67 if (file_util::DirectoryExists(temp_path)) { 67 if (base::DirectoryExists(temp_path)) {
68 installer::SelfCleaningTempDir temp_dir; 68 installer::SelfCleaningTempDir temp_dir;
69 if (!temp_dir.Initialize(target_path.DirName(), 69 if (!temp_dir.Initialize(target_path.DirName(),
70 installer::kInstallTempDir) || 70 installer::kInstallTempDir) ||
71 !temp_dir.Delete()) { 71 !temp_dir.Delete()) {
72 LOG(ERROR) << "Failed to delete temp dir " << temp_path.value(); 72 LOG(ERROR) << "Failed to delete temp dir " << temp_path.value();
73 } 73 }
74 } 74 }
75 } 75 }
76 76
77 // Iterates over the list of distribution types in |dist_types|, and 77 // Iterates over the list of distribution types in |dist_types|, and
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 // deletion unconditionally. If they are not empty, the session manager 1426 // deletion unconditionally. If they are not empty, the session manager
1427 // will not delete them on reboot. 1427 // will not delete them on reboot.
1428 ScheduleParentAndGrandparentForDeletion(target_path); 1428 ScheduleParentAndGrandparentForDeletion(target_path);
1429 } else if (DeleteApplicationProductAndVendorDirectories(target_path) == 1429 } else if (DeleteApplicationProductAndVendorDirectories(target_path) ==
1430 installer::DELETE_FAILED) { 1430 installer::DELETE_FAILED) {
1431 *uninstall_status = installer::UNINSTALL_FAILED; 1431 *uninstall_status = installer::UNINSTALL_FAILED;
1432 } 1432 }
1433 } 1433 }
1434 1434
1435 } // namespace installer 1435 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_util_unittest.cc ('k') | chrome/installer/util/copy_tree_work_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698