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

Side by Side Diff: components/sync_sessions/sessions_sync_manager.cc

Issue 2753753005: [sync] WebContentsObserver based sessions notifications (Closed)
Patch Set: [sync] WebContentsObserver based sessions notifications 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/sync_sessions/sessions_sync_manager.h" 5 #include "components/sync_sessions/sessions_sync_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 113
114 } // namespace 114 } // namespace
115 115
116 // |local_device| is owned by ProfileSyncService, its lifetime exceeds 116 // |local_device| is owned by ProfileSyncService, its lifetime exceeds
117 // lifetime of SessionSyncManager. 117 // lifetime of SessionSyncManager.
118 SessionsSyncManager::SessionsSyncManager( 118 SessionsSyncManager::SessionsSyncManager(
119 sync_sessions::SyncSessionsClient* sessions_client, 119 sync_sessions::SyncSessionsClient* sessions_client,
120 syncer::SyncPrefs* sync_prefs, 120 syncer::SyncPrefs* sync_prefs,
121 LocalDeviceInfoProvider* local_device, 121 LocalDeviceInfoProvider* local_device,
122 std::unique_ptr<LocalSessionEventRouter> router, 122 LocalSessionEventRouter* router,
123 const base::Closure& sessions_updated_callback, 123 const base::Closure& sessions_updated_callback,
124 const base::Closure& datatype_refresh_callback) 124 const base::Closure& datatype_refresh_callback)
125 : sessions_client_(sessions_client), 125 : sessions_client_(sessions_client),
126 session_tracker_(sessions_client), 126 session_tracker_(sessions_client),
127 favicon_cache_(sessions_client->GetFaviconService(), 127 favicon_cache_(sessions_client->GetFaviconService(),
128 sessions_client->GetHistoryService(), 128 sessions_client->GetHistoryService(),
129 kMaxSyncFavicons), 129 kMaxSyncFavicons),
130 local_tab_pool_out_of_sync_(true), 130 local_tab_pool_out_of_sync_(true),
131 sync_prefs_(sync_prefs), 131 sync_prefs_(sync_prefs),
132 local_device_(local_device), 132 local_device_(local_device),
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 } 1139 }
1140 1140
1141 // static 1141 // static
1142 std::string SessionsSyncManager::TagHashFromSpecifics( 1142 std::string SessionsSyncManager::TagHashFromSpecifics(
1143 const sync_pb::SessionSpecifics& specifics) { 1143 const sync_pb::SessionSpecifics& specifics) {
1144 return syncer::GenerateSyncableHash(syncer::SESSIONS, 1144 return syncer::GenerateSyncableHash(syncer::SESSIONS,
1145 TagFromSpecifics(specifics)); 1145 TagFromSpecifics(specifics));
1146 } 1146 }
1147 1147
1148 }; // namespace sync_sessions 1148 }; // namespace sync_sessions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698