| 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..2f9c6832a21cf6286565dfaf2170a788e1a3d533 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());
|
| @@ -25,7 +28,7 @@ content::NavigationEntry* SyncedTabDelegate::GetEntryAtIndexMaybePending(
|
| }
|
|
|
| bool SyncedTabDelegate::ShouldSync() const {
|
| - if (GetSyncedWindowDelegate() == NULL)
|
| + if (GetSyncedWindowDelegate() == nullptr)
|
| return false;
|
|
|
| // Is there a valid NavigationEntry?
|
| @@ -58,8 +61,16 @@ 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 synced_window_getter_->FindById(GetWindowId());
|
| }
|
|
|
| } // namespace browser_sync
|
|
|