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

Unified Diff: components/sync_sessions/sessions_sync_manager.cc

Issue 2479683006: [Sync] Add support for identifying tabbed activites (Closed)
Patch Set: Self review Created 4 years, 1 month 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
« no previous file with comments | « components/sync/protocol/session_specifics.proto ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bee87234c329e97cf3816b75d287316cd660abac..b2c62df09a0721c5b8e90df659a0617b76f91b33 100644
--- a/components/sync_sessions/sessions_sync_manager.cc
+++ b/components/sync_sessions/sessions_sync_manager.cc
@@ -245,9 +245,14 @@ void SessionsSyncManager::AssociateWindows(
if ((*i)->IsTypeTabbed()) {
window_s.set_browser_type(
sync_pb::SessionWindow_BrowserType_TYPE_TABBED);
- } else {
+ } else if ((*i)->IsTypePopup()) {
window_s.set_browser_type(
sync_pb::SessionWindow_BrowserType_TYPE_POPUP);
+ } else {
+ // This is a custom tab within an app. These will not be restored on
+ // startup if not present.
+ window_s.set_browser_type(
+ sync_pb::SessionWindow_BrowserType_TYPE_CUSTOM_TAB);
}
bool found_tabs = false;
@@ -836,6 +841,8 @@ void SessionsSyncManager::BuildSyncedSessionFromSpecifics(
sync_pb::SessionWindow_BrowserType_TYPE_TABBED) {
session_window->type = sessions::SessionWindow::TYPE_TABBED;
} else {
+ // Note: custom tabs are treated like popup windows on restore, as you can
+ // restore a custom tab on a platform that doesn't support them.
session_window->type = sessions::SessionWindow::TYPE_POPUP;
}
}
« no previous file with comments | « components/sync/protocol/session_specifics.proto ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698