OLD | NEW |
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 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 #ifndef CHROME_BROWSER_WIN_JUMPLIST_FILE_UTIL_H_ | 5 #ifndef CHROME_BROWSER_WIN_JUMPLIST_FILE_UTIL_H_ |
6 #define CHROME_BROWSER_WIN_JUMPLIST_FILE_UTIL_H_ | 6 #define CHROME_BROWSER_WIN_JUMPLIST_FILE_UTIL_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 | 9 |
10 // Maximum number of icon files allowed to delete per jumplist update. | 10 // Maximum number of icon files allowed to delete per jumplist update. |
11 const int kFileDeleteLimit = 60; | 11 const int kFileDeleteLimit = 30; |
12 | 12 |
13 // Folder delete status enumeration, used in Delete* methods below. | 13 // Folder delete status enumeration, used in Delete* methods below. |
14 // This is used for UMA. Do not delete entries, and keep in sync with | 14 // This is used for UMA. Do not delete entries, and keep in sync with |
15 // histograms.xml. | 15 // histograms.xml. |
16 enum FolderDeleteResult { | 16 enum FolderDeleteResult { |
17 SUCCEED = 0, | 17 SUCCEED = 0, |
18 // File name's length exceeds MAX_PATH. This shouldn't happen. | 18 // File name's length exceeds MAX_PATH. This shouldn't happen. |
19 FAIL_INVALID_FILE_PATH, | 19 FAIL_INVALID_FILE_PATH, |
20 // JumpListIcons{,Old} directories are read-only. This may heppen. | 20 // JumpListIcons{,Old} directories are read-only. This may heppen. |
21 FAIL_READ_ONLY_DIRECTORY, | 21 FAIL_READ_ONLY_DIRECTORY, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // Deletes the directory at |path| and records the result to UMA. | 77 // Deletes the directory at |path| and records the result to UMA. |
78 void DeleteDirectoryAndLogResults(const base::FilePath& path, | 78 void DeleteDirectoryAndLogResults(const base::FilePath& path, |
79 int max_file_deleted); | 79 int max_file_deleted); |
80 | 80 |
81 // Deletes the content in the directory at |path| and records the result to UMA. | 81 // Deletes the content in the directory at |path| and records the result to UMA. |
82 void DeleteDirectoryContentAndLogResults(const base::FilePath& path, | 82 void DeleteDirectoryContentAndLogResults(const base::FilePath& path, |
83 int max_file_deleted); | 83 int max_file_deleted); |
84 | 84 |
85 #endif // CHROME_BROWSER_WIN_JUMPLIST_FILE_UTIL_H_ | 85 #endif // CHROME_BROWSER_WIN_JUMPLIST_FILE_UTIL_H_ |
OLD | NEW |