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

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

Issue 7618037: base: Rename FileEnumerator::FILE_TYPE to FileEnumerator::FileType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « chrome/common/zip_unittest.cc ('k') | chrome/tools/profiles/generate_profile.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 5
6 #include "chrome/installer/util/duplicate_tree_detector.h" 6 #include "chrome/installer/util/duplicate_tree_detector.h"
7 7
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 13 matching lines...) Expand all
24 // Two files are "identical" if the file sizes are equivalent. 24 // Two files are "identical" if the file sizes are equivalent.
25 is_identical = src_info.size == dest_info.size; 25 is_identical = src_info.size == dest_info.size;
26 } else if (src_info.is_directory && dest_info.is_directory) { 26 } else if (src_info.is_directory && dest_info.is_directory) {
27 // Two directories are "identical" if dest_path contains entries that are 27 // Two directories are "identical" if dest_path contains entries that are
28 // "identical" to all the entries in src_path. 28 // "identical" to all the entries in src_path.
29 is_identical = true; 29 is_identical = true;
30 30
31 FileEnumerator path_enum( 31 FileEnumerator path_enum(
32 src_path, 32 src_path,
33 false, // Not recursive 33 false, // Not recursive
34 static_cast<FileEnumerator::FILE_TYPE>( 34 static_cast<FileEnumerator::FileType>(
35 FileEnumerator::FILES | FileEnumerator::DIRECTORIES)); 35 FileEnumerator::FILES | FileEnumerator::DIRECTORIES));
36 for (FilePath path = path_enum.Next(); is_identical && !path.empty(); 36 for (FilePath path = path_enum.Next(); is_identical && !path.empty();
37 path = path_enum.Next()) { 37 path = path_enum.Next()) {
38 is_identical = 38 is_identical =
39 IsIdenticalFileHierarchy(path, dest_path.Append(path.BaseName())); 39 IsIdenticalFileHierarchy(path, dest_path.Append(path.BaseName()));
40 } 40 }
41 } else { 41 } else {
42 // The two paths are of different types, so they cannot be identical. 42 // The two paths are of different types, so they cannot be identical.
43 DCHECK(!is_identical); 43 DCHECK(!is_identical);
44 } 44 }
45 } 45 }
46 46
47 return is_identical; 47 return is_identical;
48 } 48 }
49 49
50 } // namespace installer 50 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/common/zip_unittest.cc ('k') | chrome/tools/profiles/generate_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698