Index: chrome/browser/sync/glue/synced_tab_delegate.cc |
diff --git a/chrome/browser/sync/glue/synced_tab_delegate.cc b/chrome/browser/sync/glue/synced_tab_delegate.cc |
index ba6f9f3dd69a4052f526fb281924e9248eae1dc6..073a7e36e2910f91262f129461a240355e124419 100644 |
--- a/chrome/browser/sync/glue/synced_tab_delegate.cc |
+++ b/chrome/browser/sync/glue/synced_tab_delegate.cc |
@@ -4,7 +4,7 @@ |
#include "chrome/browser/sync/glue/synced_tab_delegate.h" |
-#include "chrome/browser/sync/glue/synced_window_delegate.h" |
+#include "base/logging.h" |
#include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
#include "chrome/common/url_constants.h" |
#include "content/public/browser/navigation_entry.h" |
@@ -14,6 +14,9 @@ using browser_sync::SyncedTabDelegate; |
namespace browser_sync { |
+SyncedTabDelegate::SyncedTabDelegate() {} |
+SyncedTabDelegate::~SyncedTabDelegate() {} |
+ |
content::NavigationEntry* SyncedTabDelegate::GetCurrentEntryMaybePending() |
const { |
return GetEntryAtIndexMaybePending(GetCurrentEntryIndex()); |
@@ -58,8 +61,17 @@ bool SyncedTabDelegate::ShouldSync() const { |
return found_valid_url; |
} |
+void SyncedTabDelegate::SetSyncedWindowGetter( |
+ scoped_ptr<SyncedWindowDelegatesGetter> getter) { |
+ synced_window_getter_.reset(getter.release()); |
+} |
+ |
const SyncedWindowDelegate* SyncedTabDelegate::GetSyncedWindowDelegate() const { |
- return SyncedWindowDelegate::FindById(GetWindowId()); |
+ if (!synced_window_getter_) { |
+ NOTREACHED(); |
+ return NULL; |
+ } |
+ return synced_window_getter_->FindById(GetWindowId()); |
} |
} // namespace browser_sync |