| Index: components/sync_sessions/sessions_sync_manager.cc
|
| diff --git a/components/sync_sessions/sessions_sync_manager.cc b/components/sync_sessions/sessions_sync_manager.cc
|
| index d61d75591b9a75f8bf94956cfdbe0bec00c1797b..2c49b4b7dcd85020fb3d7f5f54352b327de39933 100644
|
| --- a/components/sync_sessions/sessions_sync_manager.cc
|
| +++ b/components/sync_sessions/sessions_sync_manager.cc
|
| @@ -128,6 +128,7 @@ SessionsSyncManager::SessionsSyncManager(
|
| sessions_client->GetHistoryService(),
|
| kMaxSyncFavicons),
|
| local_tab_pool_out_of_sync_(true),
|
| + all_browsers_closing_(false),
|
| sync_prefs_(sync_prefs),
|
| local_device_(local_device),
|
| current_device_type_(sync_pb::SyncEnums_DeviceType_TYPE_OTHER),
|
| @@ -469,6 +470,11 @@ void SessionsSyncManager::OnLocalTabModified(SyncedTabDelegate* modified_tab) {
|
| return;
|
| }
|
|
|
| + if (all_browsers_closing_) {
|
| + // Do not sync tabs closing during browser shutdown.
|
| + return;
|
| + }
|
| +
|
| syncer::SyncChangeList changes;
|
| AssociateTab(modified_tab, &changes);
|
| // Note, we always associate windows because it's possible a tab became
|
| @@ -485,6 +491,14 @@ void SessionsSyncManager::OnFaviconsChanged(const std::set<GURL>& page_urls,
|
| favicon_cache_.OnPageFaviconUpdated(page_url);
|
| }
|
|
|
| +void SessionsSyncManager::SetAllBrowsersClosing(bool browsers_closing) {
|
| + all_browsers_closing_ = browsers_closing;
|
| +}
|
| +
|
| +bool SessionsSyncManager::GetAllBrowsersClosingForTesting() {
|
| + return all_browsers_closing_;
|
| +}
|
| +
|
| void SessionsSyncManager::StopSyncing(syncer::ModelType type) {
|
| local_event_router_->Stop();
|
| if (sync_processor_.get() && lost_navigations_recorder_.get()) {
|
|
|