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

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: Fix pre-rendering + revert changes to SessionTabHelper. 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 2bed2ae65092728e2ad5ce3cae9af82dadfb1006..ce0ab4cc6562a9e69b029d5a8627a6ee89601cd9 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -213,10 +213,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 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->HasWebContents() && !AssociateTab(*tab, error)) {
// Association failed. Either we need to re-associate, or this is an
// unrecoverable error.
return false;
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | chrome/browser/sync/glue/session_model_associator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698