Chromium Code Reviews| Index: chrome/browser/sync/glue/synced_tab_delegate_android.cc |
| diff --git a/chrome/browser/sync/glue/synced_tab_delegate_android.cc b/chrome/browser/sync/glue/synced_tab_delegate_android.cc |
| index 8173dfbba0da516fab9a53583d80217945893943..5629a71f177c01ac6ddcaa1f134f3c1f54e986c7 100644 |
| --- a/chrome/browser/sync/glue/synced_tab_delegate_android.cc |
| +++ b/chrome/browser/sync/glue/synced_tab_delegate_android.cc |
| @@ -8,6 +8,7 @@ |
| #include "chrome/browser/android/tab_android.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/sync/glue/synced_window_delegate.h" |
| +#include "chrome/browser/sync/glue/synced_window_delegates_getter_android.h" |
| #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
| #include "content/public/browser/navigation_entry.h" |
| #include "content/public/browser/web_contents.h" |
| @@ -118,7 +119,13 @@ void SyncedTabDelegateAndroid::SetSyncId(int sync_id) { |
| SyncedTabDelegate* SyncedTabDelegate::ImplFromWebContents( |
| content::WebContents* web_contents) { |
| TabAndroid* tab = TabAndroid::FromWebContents(web_contents); |
| - return tab ? tab->GetSyncedTabDelegate() : NULL; |
| + if (!tab) { |
| + return NULL; |
|
Nicolas Zea
2015/09/02 21:19:44
nit: style guide recommends nullptr for all new co
maxbogue
2015/09/02 23:05:40
Done.
|
| + } |
| + SyncedTabDelegate* delegate = tab->GetSyncedTabDelegate(); |
|
Nicolas Zea
2015/09/02 21:19:43
Can delegate be null? Should that be handled?
maxbogue
2015/09/02 23:05:40
Yes, thank you. I forgot there were two versions o
|
| + delegate->SetSyncedWindowGetter(make_scoped_ptr( |
| + new SyncedWindowDelegatesGetterAndroid())); |
| + return delegate; |
| } |
| } // namespace browser_sync |