Index: chrome/browser/sync/glue/synced_window_delegate_android.cc |
diff --git a/chrome/browser/sync/glue/synced_window_delegate_android.cc b/chrome/browser/sync/glue/synced_window_delegate_android.cc |
index 4d8f4bab319670a69cacb8c865a396b2f0d414d1..2947db39364a106216fa81a25329ff67a4880aa2 100644 |
--- a/chrome/browser/sync/glue/synced_window_delegate_android.cc |
+++ b/chrome/browser/sync/glue/synced_window_delegate_android.cc |
@@ -5,10 +5,9 @@ |
#include "chrome/browser/sync/glue/synced_window_delegate_android.h" |
#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/sync/glue/synced_tab_delegate_android.h" |
#include "chrome/browser/ui/android/tab_model/tab_model.h" |
#include "chrome/browser/ui/android/tab_model/tab_model_list.h" |
-#include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
-#include "chrome/browser/sessions/session_id.h" |
#include "content/public/browser/web_contents.h" |
namespace browser_sync { |
@@ -77,13 +76,12 @@ bool SyncedWindowDelegateAndroid::IsTabPinned( |
} |
SyncedTabDelegate* SyncedWindowDelegateAndroid::GetTabAt(int index) const { |
- content::WebContents* web_contents = tab_model_->GetWebContentsAt(index); |
- return web_contents ? TabContentsSyncedTabDelegate::FromWebContents( |
- web_contents) : NULL; |
+ return tab_model_->GetTabAt(index); |
} |
SessionID::id_type SyncedWindowDelegateAndroid::GetTabIdAt(int index) const { |
- return tab_model_->GetTabIdAt(index); |
+ SyncedTabDelegate* tab = GetTabAt(index); |
+ return tab ? tab->GetSessionId() : -1; |
Yaron
2013/05/21 18:32:07
Can this be null? Don't we always have an android
shashi
2013/05/21 23:11:21
This should not be null, but TabModelImpl uses Get
|
} |
bool SyncedWindowDelegateAndroid::IsSessionRestoreInProgress() const { |