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

Unified Diff: chrome/browser/win/jumplist_file_util.h

Issue 2859193005: Cache JumpList icons to avoid unnecessary creation and deletion (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/win/jumplist_file_util.h
diff --git a/chrome/browser/win/jumplist_file_util.h b/chrome/browser/win/jumplist_file_util.h
index 6d53ec2595271bf78e2a04ba2735859baf45e628..7b74dcd0d33aa4e5e9473a6bac2db6b1191ada57 100644
--- a/chrome/browser/win/jumplist_file_util.h
+++ b/chrome/browser/win/jumplist_file_util.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_WIN_JUMPLIST_FILE_UTIL_H_
#define CHROME_BROWSER_WIN_JUMPLIST_FILE_UTIL_H_
+#include <set>
+
#include "base/files/file_path.h"
// Maximum number of icon files allowed to delete per jumplist update.
@@ -39,4 +41,12 @@ void DeleteDirectory(const base::FilePath& path, int max_file_deleted);
void DeleteDirectoryContentAndLogRuntime(const base::FilePath& path,
int max_file_deleted);
+// Returns true if the directory at |path| has more than |max_files| files.
+// Sub-directories are not taken into account here.
+bool FilesExceedLimitInDir(const base::FilePath& path, int max_files);
+
+// Deletes all files in the directory at |path| but not in set |iconpath_set|.
+void DeleteNonCachedFiles(const base::FilePath& path,
+ const std::set<base::FilePath>& iconpath_set);
grt (UTC plus 2) 2017/05/11 20:29:13 nit: iconpath_set -> cached_files since these are
chengx 2017/05/12 01:04:24 Done.
+
#endif // CHROME_BROWSER_WIN_JUMPLIST_FILE_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698