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

Unified Diff: chrome/browser/sync/glue/synced_tab_delegate_desktop.cc

Issue 1310373009: [Sync] Remove static methods on SyncedWindowDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 3 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/synced_tab_delegate_desktop.cc
diff --git a/chrome/browser/sync/glue/synced_tab_delegate_desktop.cc b/chrome/browser/sync/glue/synced_tab_delegate_desktop.cc
index 195d0e0b240cb14229f717bd29c532fc48c026d1..ff56072c2998c5bd8e319a24378f8d6fd961d9cf 100644
--- a/chrome/browser/sync/glue/synced_tab_delegate_desktop.cc
+++ b/chrome/browser/sync/glue/synced_tab_delegate_desktop.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "chrome/browser/sync/glue/synced_tab_delegate.h"
+#include "chrome/browser/ui/sync/browser_synced_window_delegates_getter.h"
#include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h"
// This should be the version of ImplFromWebContents that's pulled in for non-
@@ -17,7 +18,14 @@ namespace browser_sync {
// static
SyncedTabDelegate* SyncedTabDelegate::ImplFromWebContents(
content::WebContents* web_contents) {
- return TabContentsSyncedTabDelegate::FromWebContents(web_contents);
+ SyncedTabDelegate* delegate =
+ TabContentsSyncedTabDelegate::FromWebContents(web_contents);
+ if (!delegate) {
+ return nullptr;
+ }
+ delegate->SetSyncedWindowGetter(make_scoped_ptr(
+ new BrowserSyncedWindowDelegatesGetter()));
+ return delegate;
}
} // namespace browser_sync
« no previous file with comments | « chrome/browser/sync/glue/synced_tab_delegate_android.cc ('k') | chrome/browser/sync/glue/synced_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698