| Index: chrome/browser/sessions/persistent_tab_restore_service.cc
|
| diff --git a/chrome/browser/sessions/persistent_tab_restore_service.cc b/chrome/browser/sessions/persistent_tab_restore_service.cc
|
| index d8df61b4bb9f9d367999cd88be363579823d9336..8f561f6c8b6a2f496e85318ecc6cac04cdbb7b79 100644
|
| --- a/chrome/browser/sessions/persistent_tab_restore_service.cc
|
| +++ b/chrome/browser/sessions/persistent_tab_restore_service.cc
|
| @@ -318,10 +318,17 @@ void PersistentTabRestoreService::Delegate::OnAddEntry() {
|
| }
|
|
|
| void PersistentTabRestoreService::Delegate::LoadTabsFromLastSession() {
|
| - if (load_state_ != NOT_LOADED ||
|
| - tab_restore_service_helper_->entries().size() == kMaxEntries)
|
| + if (load_state_ != NOT_LOADED)
|
| return;
|
|
|
| + if (tab_restore_service_helper_->entries().size() == kMaxEntries) {
|
| + // We already have the max number of entries we can take. There is no point
|
| + // in attempting to load since we'll just drop the results. Skip to loaded.
|
| + load_state_ = (LOADING | LOADED_LAST_SESSION | LOADED_LAST_TABS);
|
| + LoadStateChanged();
|
| + return;
|
| + }
|
| +
|
| #if !defined(ENABLE_SESSION_SERVICE)
|
| // If sessions are not stored in the SessionService, default to
|
| // |LOADED_LAST_SESSION| state.
|
| @@ -818,6 +825,7 @@ void PersistentTabRestoreService::Delegate::LoadStateChanged() {
|
| const Entries& entries = tab_restore_service_helper_->entries();
|
| if (staging_entries_.empty() || entries.size() >= kMaxEntries) {
|
| staging_entries_.clear();
|
| + tab_restore_service_helper_->NotifyLoaded();
|
| return;
|
| }
|
|
|
| @@ -850,6 +858,8 @@ void PersistentTabRestoreService::Delegate::LoadStateChanged() {
|
|
|
| tab_restore_service_helper_->PruneEntries();
|
| tab_restore_service_helper_->NotifyTabsChanged();
|
| +
|
| + tab_restore_service_helper_->NotifyLoaded();
|
| }
|
|
|
| void PersistentTabRestoreService::Delegate::RemoveEntryByID(
|
|
|