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

Unified Diff: chrome/browser/sync/glue/session_model_associator.cc

Issue 15499005: Add a new SyncedTabDelegate for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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: chrome/browser/sync/glue/session_model_associator.cc
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index 798db3a965c303ad16c5cbc22b4db6e9e4e55d31..269d12c778547aa7162e260c0fe5ed1625830afc 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -237,10 +237,10 @@ bool SessionModelAssociator::AssociateWindows(bool reload_tabs,
if (reload_tabs) {
SyncedTabDelegate* tab = (*i)->GetTabAt(j);
- // It's possible for GetTabAt to return a null tab if it's not in
- // memory. We can assume this means the tab already existed but hasn't
- // changed, so no need to reassociate.
- if (tab && !AssociateTab(*tab, error)) {
+ // It's possible for GetTabAt to return a null tab or a tab which has
+ // no web contents. We can assume this means the tab already existed
+ // but hasn't changed, so no need to reassociate.
+ if (tab && tab->HasWebContents() && !AssociateTab(*tab, error)) {
Yaron 2013/05/21 18:32:07 I believe the existence-check for tab was purely f
shashi 2013/05/21 23:11:21 Done.
// Association failed. Either we need to re-associate, or this is an
// unrecoverable error.
return false;

Powered by Google App Engine
This is Rietveld 408576698