Commit e1891a04 authored by David Bienvenu's avatar David Bienvenu Committed by Commit Bot

Make Windows jumplist menu items be profile-specific.

If the user has more than one profile,
specify the profile directory in the jumplist menu item.

Bug: 19072
Change-Id: I6ece249f4414d01779f30473a24984a73164e08e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2079216
Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747435}
parent 31b5ab0c
This diff is collapsed.
......@@ -170,12 +170,18 @@ class JumpList : public sessions::TabRestoreServiceObserver,
void OnMostVisitedURLsAvailable(const history::MostVisitedURLList& data);
// Adds a new ShellLinkItem for |tab| to the JumpList data provided that doing
// so will not exceed |max_items|.
bool AddTab(const sessions::TabRestoreService::Tab& tab, size_t max_items);
// so will not exceed |max_items|. If |cmd_line_profile_dir| is not empty,
// it will be added to the command line switch --profile-directory.
bool AddTab(const sessions::TabRestoreService::Tab& tab,
const base::FilePath& cmd_line_profile_dir,
size_t max_items);
// Adds a new ShellLinkItem for each tab in |window| to the JumpList data
// provided that doing so will not exceed |max_items|.
// provided that doing so will not exceed |max_items|. If
// |cmd_line_profile_dir| is not empty, it will be added to the command line
// switch --profile-directory.
void AddWindow(const sessions::TabRestoreService::Window& window,
const base::FilePath& cmd_line_profile_dir,
size_t max_items);
// Starts loading a favicon for each URL in |icon_urls_|.
......@@ -218,6 +224,7 @@ class JumpList : public sessions::TabRestoreServiceObserver,
const base::FilePath& profile_dir,
const ShellLinkItemList& most_visited_pages,
const ShellLinkItemList& recently_closed_pages,
const base::FilePath& cmd_line_profile_dir,
bool most_visited_should_update,
bool recently_closed_should_update,
IncognitoModePrefs::Availability incognito_availability,
......@@ -231,6 +238,7 @@ class JumpList : public sessions::TabRestoreServiceObserver,
const base::FilePath& recently_closed_icon_dir,
const ShellLinkItemList& most_visited_pages,
const ShellLinkItemList& recently_closed_pages,
const base::FilePath& cmd_line_profile_dir,
bool most_visited_should_update,
bool recently_closed_should_update,
IncognitoModePrefs::Availability incognito_availability,
......@@ -262,6 +270,11 @@ class JumpList : public sessions::TabRestoreServiceObserver,
static void DeleteIconFiles(const base::FilePath& icon_dir,
const URLIconCache& icons_cache);
// Gets the basename of the profile directory for |profile_|, suitable for
// appending --profile-directory=<profile name> to jumplist items' command
// lines. If the user has only one profile, this returns an empty FilePath.
base::FilePath GetCmdLineProfileDir();
// Tracks FaviconService tasks.
base::CancelableTaskTracker cancelable_task_tracker_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment