Chromium Code Reviews| Index: chrome/browser/win/jumplist.cc |
| diff --git a/chrome/browser/win/jumplist.cc b/chrome/browser/win/jumplist.cc |
| index bbca037062d132ddc5c693646170827aee422cee..a366229f79526fea4b2d2f67ed42c41bbe309868 100644 |
| --- a/chrome/browser/win/jumplist.cc |
| +++ b/chrome/browser/win/jumplist.cc |
| @@ -266,6 +266,9 @@ void JumpList::TopSitesChanged(history::TopSites* top_sites, |
| ChangeReason change_reason) { |
| DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
| + if (!JumpListUpdater::IsEnabled()) |
|
grt (UTC plus 2)
2017/06/24 20:42:44
BrowserView::InitViews only constructs a JumpList
chengx
2017/06/29 19:14:37
That should be enough.
|
| + return; |
| + |
| top_sites_has_pending_notification_ = true; |
| // Postpone handling this notification until a pending update completes. |
| @@ -282,6 +285,9 @@ void JumpList::TopSitesChanged(history::TopSites* top_sites, |
| void JumpList::TabRestoreServiceChanged(sessions::TabRestoreService* service) { |
| DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
| + if (!JumpListUpdater::IsEnabled()) |
| + return; |
| + |
| tab_restore_has_pending_notification_ = true; |
| // Postpone handling this notification until a pending update completes. |
| @@ -301,6 +307,9 @@ void JumpList::TabRestoreServiceDestroyed( |
| void JumpList::OnIncognitoAvailabilityChanged() { |
| DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
| + if (!JumpListUpdater::IsEnabled()) |
| + return; |
| + |
| if (icon_urls_.empty()) |
| PostRunUpdate(); |
| } |
| @@ -664,9 +673,6 @@ void JumpList::RunUpdateJumpList( |
| bool recently_closed_should_update, |
| IncognitoModePrefs::Availability incognito_availability, |
| UpdateResults* update_results) { |
| - if (!JumpListUpdater::IsEnabled()) |
| - return; |
| - |
| DCHECK(update_results); |
| JumpListUpdater jumplist_updater(app_id); |