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

Unified Diff: ios/chrome/browser/sync/ios_chrome_sync_client.mm

Issue 2753753005: [sync] WebContentsObserver based sessions notifications (Closed)
Patch Set: use base:MakeUnique, alphabetize Created 3 years, 9 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
« no previous file with comments | « components/sync_sessions/tab_node_pool.cc ('k') | ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/sync/ios_chrome_sync_client.mm
diff --git a/ios/chrome/browser/sync/ios_chrome_sync_client.mm b/ios/chrome/browser/sync/ios_chrome_sync_client.mm
index 949d4bc7d33527da7ffd996a2daae149295572f5..0a61212fbd82bb293e4ff6f5903cbff556298840 100644
--- a/ios/chrome/browser/sync/ios_chrome_sync_client.mm
+++ b/ios/chrome/browser/sync/ios_chrome_sync_client.mm
@@ -79,7 +79,13 @@ class SyncSessionsClientImpl : public sync_sessions::SyncSessionsClient {
explicit SyncSessionsClientImpl(ios::ChromeBrowserState* browser_state)
: browser_state_(browser_state),
window_delegates_getter_(
- base::MakeUnique<TabModelSyncedWindowDelegatesGetter>()) {}
+ base::MakeUnique<TabModelSyncedWindowDelegatesGetter>()),
+ local_session_event_router_(
+ base::MakeUnique<IOSChromeLocalSessionEventRouter>(
+ browser_state_,
+ this,
+ ios::sync_start_util::GetFlareForSyncableService(
+ browser_state_->GetStatePath()))) {}
~SyncSessionsClientImpl() override {}
@@ -116,19 +122,17 @@ class SyncSessionsClientImpl : public sync_sessions::SyncSessionsClient {
return window_delegates_getter_.get();
}
- std::unique_ptr<sync_sessions::LocalSessionEventRouter>
- GetLocalSessionEventRouter() override {
- syncer::SyncableService::StartSyncFlare flare(
- ios::sync_start_util::GetFlareForSyncableService(
- browser_state_->GetStatePath()));
- return base::MakeUnique<IOSChromeLocalSessionEventRouter>(browser_state_,
- this, flare);
+ sync_sessions::LocalSessionEventRouter* GetLocalSessionEventRouter()
+ override {
+ return local_session_event_router_.get();
}
private:
ios::ChromeBrowserState* const browser_state_;
const std::unique_ptr<sync_sessions::SyncedWindowDelegatesGetter>
window_delegates_getter_;
+ const std::unique_ptr<IOSChromeLocalSessionEventRouter>
+ local_session_event_router_;
DISALLOW_COPY_AND_ASSIGN(SyncSessionsClientImpl);
};
« no previous file with comments | « components/sync_sessions/tab_node_pool.cc ('k') | ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698