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

Unified Diff: components/sync_sessions/sessions_sync_manager.h

Issue 2750163003: Prevent tabs sync during browser shutdown.
Patch Set: Created 3 years, 9 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
Index: components/sync_sessions/sessions_sync_manager.h
diff --git a/components/sync_sessions/sessions_sync_manager.h b/components/sync_sessions/sessions_sync_manager.h
index d685c65cd42b58f7cb22d4b2b3b6810761165eec..293a45c4994bc9b964a3f8801f9c0de27be7a138 100644
--- a/components/sync_sessions/sessions_sync_manager.h
+++ b/components/sync_sessions/sessions_sync_manager.h
@@ -101,6 +101,11 @@ class SessionsSyncManager : public syncer::SyncableService,
void OnLocalTabModified(SyncedTabDelegate* modified_tab) override;
void OnFaviconsChanged(const std::set<GURL>& page_urls,
const GURL& icon_url) override;
+ void SetAllBrowsersClosing(bool browsers_closing) override;
+
+ bool GetAllBrowsersClosingForTesting();
+ static void SetInitialAllBrowsersClosingValueForTesting(
+ bool initial_browsers_closing);
// Returns the tag used to uniquely identify this machine's session in the
// sync model.
@@ -286,6 +291,10 @@ class SessionsSyncManager : public syncer::SyncableService,
// proves that we are still relevant.
bool local_tab_pool_out_of_sync_;
+ // Indicates that browsers are closing, so we shouldn't sync tabs closing
+ // events.
+ bool all_browsers_closing_;
+
syncer::SyncPrefs* sync_prefs_;
std::unique_ptr<syncer::SyncErrorFactory> error_handler_;
« no previous file with comments | « components/sync_sessions/local_session_event_router.h ('k') | components/sync_sessions/sessions_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698