OLD | NEW |
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 // This file declares a helper function that will check to see if a given folder | 5 // This file declares a helper function that will check to see if a given folder |
6 // is "identical" to another (for some value of identical, see below). | 6 // is "identical" to another (for some value of identical, see below). |
7 // | 7 // |
8 | 8 |
9 #ifndef CHROME_INSTALLER_UTIL_DUPLICATE_TREE_DETECTOR_H_ | 9 #ifndef CHROME_INSTALLER_UTIL_DUPLICATE_TREE_DETECTOR_H_ |
10 #define CHROME_INSTALLER_UTIL_DUPLICATE_TREE_DETECTOR_H_ | 10 #define CHROME_INSTALLER_UTIL_DUPLICATE_TREE_DETECTOR_H_ |
11 | 11 |
| 12 namespace base { |
12 class FilePath; | 13 class FilePath; |
| 14 } |
13 | 15 |
14 namespace installer { | 16 namespace installer { |
15 | 17 |
16 // Returns true if |dest_path| contains all the files from |src_path| in the | 18 // Returns true if |dest_path| contains all the files from |src_path| in the |
17 // same directory structure and each of those files is of the same length. | 19 // same directory structure and each of those files is of the same length. |
18 // src_path_ and |dest_path| must either both be files or both be directories. | 20 // src_path_ and |dest_path| must either both be files or both be directories. |
19 // Note that THIS IS A WEAK DEFINITION OF IDENTICAL and is intended only to | 21 // Note that THIS IS A WEAK DEFINITION OF IDENTICAL and is intended only to |
20 // catch cases of missing files or obvious modifications. | 22 // catch cases of missing files or obvious modifications. |
21 // It notably DOES NOT CHECKSUM the files. | 23 // It notably DOES NOT CHECKSUM the files. |
22 bool IsIdenticalFileHierarchy(const FilePath& src_path, | 24 bool IsIdenticalFileHierarchy(const base::FilePath& src_path, |
23 const FilePath& dest_path); | 25 const base::FilePath& dest_path); |
24 | 26 |
25 } // namespace installer | 27 } // namespace installer |
26 | 28 |
27 #endif // CHROME_INSTALLER_UTIL_DUPLICATE_TREE_DETECTOR_H_ | 29 #endif // CHROME_INSTALLER_UTIL_DUPLICATE_TREE_DETECTOR_H_ |
OLD | NEW |