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

Unified Diff: chrome/browser/win/jumplist.cc

Issue 2827563002: Merge jumplist delete task and update task (Closed)
Patch Set: Fix typo Created 3 years, 8 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 | « no previous file | 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.cc
diff --git a/chrome/browser/win/jumplist.cc b/chrome/browser/win/jumplist.cc
index 06f28709f7b67eb2120e17e425e11c6f8da9b0ab..18c7922985a23dc0bba9772451dac6d68cd0b335 100644
--- a/chrome/browser/win/jumplist.cc
+++ b/chrome/browser/win/jumplist.cc
@@ -277,6 +277,9 @@ void RunUpdateJumpList(IncognitoModePrefs::Availability incognito_availability,
local_recently_closed_pages = data->recently_closed_pages_;
}
+ // Delete the content in JumpListIcons folder and log the results to UMA.
+ DeleteDirectoryContentAndLogResults(icon_dir, kFileDeleteLimit);
+
// Create a new JumpList and replace the current JumpList with it. The
// jumplist links are updated anyway, while the jumplist icons may not as
// mentioned above.
@@ -606,13 +609,8 @@ void JumpList::DeferredRunUpdate() {
profile_ ? IncognitoModePrefs::GetAvailability(profile_->GetPrefs())
: IncognitoModePrefs::ENABLED;
- // Post a task to delete the content in JumpListIcons folder and log the
- // results to UMA.
- update_jumplisticons_task_runner_->PostTask(
- FROM_HERE, base::Bind(&DeleteDirectoryContentAndLogResults, icon_dir_,
- kFileDeleteLimit));
-
- // Post a task to update the jumplist used by the shell.
+ // Post a task to update the jumplist in JumpListIcons folder, which consists
+ // of 1) delete old icons, 2) create new icons, 3) notify the OS.
update_jumplisticons_task_runner_->PostTask(
FROM_HERE, base::Bind(&RunUpdateJumpList, incognito_availability, app_id_,
icon_dir_, base::RetainedRef(jumplist_data_)));
« no previous file with comments | « no previous file | chrome/browser/win/jumplist_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698