| OLD | NEW |
| 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 base::FilePath tmp_dir; | 488 base::FilePath tmp_dir; |
| 489 base::FilePath temp_file; | 489 base::FilePath temp_file; |
| 490 if (!PathService::Get(base::DIR_TEMP, &tmp_dir)) { | 490 if (!PathService::Get(base::DIR_TEMP, &tmp_dir)) { |
| 491 NOTREACHED(); | 491 NOTREACHED(); |
| 492 return false; | 492 return false; |
| 493 } | 493 } |
| 494 | 494 |
| 495 // Change the current directory to the TMP directory. See method comment above | 495 // Change the current directory to the TMP directory. See method comment above |
| 496 // for details. | 496 // for details. |
| 497 VLOG(1) << "Changing current directory to: " << tmp_dir.value(); | 497 VLOG(1) << "Changing current directory to: " << tmp_dir.value(); |
| 498 if (!file_util::SetCurrentDirectory(tmp_dir)) | 498 if (!base::SetCurrentDirectory(tmp_dir)) |
| 499 PLOG(ERROR) << "Failed to change the current directory."; | 499 PLOG(ERROR) << "Failed to change the current directory."; |
| 500 | 500 |
| 501 for (std::vector<base::FilePath>::const_iterator it = setup_files.begin(); | 501 for (std::vector<base::FilePath>::const_iterator it = setup_files.begin(); |
| 502 it != setup_files.end(); ++it) { | 502 it != setup_files.end(); ++it) { |
| 503 const base::FilePath& setup_file = *it; | 503 const base::FilePath& setup_file = *it; |
| 504 if (!base::CreateTemporaryFileInDir(tmp_dir, &temp_file)) { | 504 if (!base::CreateTemporaryFileInDir(tmp_dir, &temp_file)) { |
| 505 LOG(ERROR) << "Failed to create temporary file for " | 505 LOG(ERROR) << "Failed to create temporary file for " |
| 506 << setup_file.BaseName().value(); | 506 << setup_file.BaseName().value(); |
| 507 return false; | 507 return false; |
| 508 } | 508 } |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1437 // If we need a reboot to continue, schedule the parent directories for | 1437 // If we need a reboot to continue, schedule the parent directories for |
| 1438 // deletion unconditionally. If they are not empty, the session manager | 1438 // deletion unconditionally. If they are not empty, the session manager |
| 1439 // will not delete them on reboot. | 1439 // will not delete them on reboot. |
| 1440 ScheduleParentAndGrandparentForDeletion(target_path); | 1440 ScheduleParentAndGrandparentForDeletion(target_path); |
| 1441 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { | 1441 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { |
| 1442 *uninstall_status = UNINSTALL_FAILED; | 1442 *uninstall_status = UNINSTALL_FAILED; |
| 1443 } | 1443 } |
| 1444 } | 1444 } |
| 1445 | 1445 |
| 1446 } // namespace installer | 1446 } // namespace installer |
| OLD | NEW |