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

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

Issue 18286004: Move PathExists to 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 // Creates a copy of the local state file and returns a path to the copy. 420 // Creates a copy of the local state file and returns a path to the copy.
421 base::FilePath BackupLocalStateFile( 421 base::FilePath BackupLocalStateFile(
422 const std::vector<base::FilePath>& local_state_folders) { 422 const std::vector<base::FilePath>& local_state_folders) {
423 base::FilePath backup; 423 base::FilePath backup;
424 424
425 // Copy the first local state file that is found. 425 // Copy the first local state file that is found.
426 for (size_t i = 0; i < local_state_folders.size(); ++i) { 426 for (size_t i = 0; i < local_state_folders.size(); ++i) {
427 const base::FilePath& local_state_folder = local_state_folders[i]; 427 const base::FilePath& local_state_folder = local_state_folders[i];
428 base::FilePath state_file( 428 base::FilePath state_file(
429 local_state_folder.Append(chrome::kLocalStateFilename)); 429 local_state_folder.Append(chrome::kLocalStateFilename));
430 if (!file_util::PathExists(state_file)) 430 if (!base::PathExists(state_file))
431 continue; 431 continue;
432 if (!file_util::CreateTemporaryFile(&backup)) 432 if (!file_util::CreateTemporaryFile(&backup))
433 LOG(ERROR) << "Failed to create temporary file for Local State."; 433 LOG(ERROR) << "Failed to create temporary file for Local State.";
434 else 434 else
435 base::CopyFile(state_file, backup); 435 base::CopyFile(state_file, backup);
436 break; 436 break;
437 } 437 }
438 return backup; 438 return backup;
439 } 439 }
440 440
(...skipping 985 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/test/alternate_version_generator_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698