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

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

Issue 2859193005: Cache JumpList icons to avoid unnecessary creation and deletion (Closed)
Patch Set: Fix nits. 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
« no previous file with comments | « chrome/browser/win/jumplist.cc ('k') | chrome/browser/win/jumplist_file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..db92b0f59ee281c383dd763a3e9786358e7d58b8 100644
--- a/chrome/browser/win/jumplist_file_util.h
+++ b/chrome/browser/win/jumplist_file_util.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_WIN_JUMPLIST_FILE_UTIL_H_
#define CHROME_BROWSER_WIN_JUMPLIST_FILE_UTIL_H_
+#include "base/containers/flat_set.h"
#include "base/files/file_path.h"
// Maximum number of icon files allowed to delete per jumplist update.
@@ -39,4 +40,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 |cached_files|.
+void DeleteNonCachedFiles(const base::FilePath& path,
+ const base::flat_set<base::FilePath>& cached_files);
+
#endif // CHROME_BROWSER_WIN_JUMPLIST_FILE_UTIL_H_
« no previous file with comments | « chrome/browser/win/jumplist.cc ('k') | chrome/browser/win/jumplist_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698