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

Unified Diff: components/sync_sessions/synced_tab_delegate.cc

Issue 1408643002: [Sync] Componentize synced_tab_delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GN, self review Created 5 years, 2 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: components/sync_sessions/synced_tab_delegate.cc
diff --git a/components/sync_sessions/synced_tab_delegate.cc b/components/sync_sessions/synced_tab_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a0a46d25643f741634134ea5ca98d7a97da22b86
--- /dev/null
+++ b/components/sync_sessions/synced_tab_delegate.cc
@@ -0,0 +1,29 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/sync_sessions/synced_tab_delegate.h"
+
+#include "base/logging.h"
+#include "components/sync_sessions/sync_sessions_client.h"
+
+using browser_sync::SyncedTabDelegate;
+
+namespace browser_sync {
+
+SyncedTabDelegate::SyncedTabDelegate() {}
+SyncedTabDelegate::~SyncedTabDelegate() {}
+
+void SyncedTabDelegate::SetSyncedWindowGetter(
+ scoped_ptr<SyncedWindowDelegatesGetter> getter) {
+ synced_window_getter_.reset(getter.release());
+}
+
+const SyncedWindowDelegate* SyncedTabDelegate::GetSyncedWindowDelegate() const {
skym 2015/10/16 16:55:47 Needs #include for SyncedWindowDelegate I think.
Nicolas Zea 2015/10/20 23:14:42 As part of cleaning this up, I realized this code
+ if (!synced_window_getter_) {
+ NOTREACHED();
+ }
+ return synced_window_getter_->FindById(GetWindowId());
+}
+
+} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698