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

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

Issue 2776633003: Add taskid for navigation, created in session sync (Closed)
Patch Set: 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 #ifndef COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ 5 #ifndef COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_
6 #define COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ 6 #define COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 12 matching lines...) Expand all
23 #include "components/sync/base/sync_prefs.h" 23 #include "components/sync/base/sync_prefs.h"
24 #include "components/sync/device_info/device_info.h" 24 #include "components/sync/device_info/device_info.h"
25 #include "components/sync/model/syncable_service.h" 25 #include "components/sync/model/syncable_service.h"
26 #include "components/sync_sessions/favicon_cache.h" 26 #include "components/sync_sessions/favicon_cache.h"
27 #include "components/sync_sessions/local_session_event_router.h" 27 #include "components/sync_sessions/local_session_event_router.h"
28 #include "components/sync_sessions/lost_navigations_recorder.h" 28 #include "components/sync_sessions/lost_navigations_recorder.h"
29 #include "components/sync_sessions/open_tabs_ui_delegate.h" 29 #include "components/sync_sessions/open_tabs_ui_delegate.h"
30 #include "components/sync_sessions/revisit/page_revisit_broadcaster.h" 30 #include "components/sync_sessions/revisit/page_revisit_broadcaster.h"
31 #include "components/sync_sessions/synced_session.h" 31 #include "components/sync_sessions/synced_session.h"
32 #include "components/sync_sessions/synced_session_tracker.h" 32 #include "components/sync_sessions/synced_session_tracker.h"
33 #include "components/sync_sessions/task_tracker.h"
33 34
34 namespace syncer { 35 namespace syncer {
35 class LocalDeviceInfoProvider; 36 class LocalDeviceInfoProvider;
36 class SyncErrorFactory; 37 class SyncErrorFactory;
37 class SyncPrefs; 38 class SyncPrefs;
38 } // namespace syncer 39 } // namespace syncer
39 40
40 namespace sync_pb { 41 namespace sync_pb {
41 class SessionHeader; 42 class SessionHeader;
42 class SessionSpecifics; 43 class SessionSpecifics;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // Loads and reassociates the local tabs referenced in |tabs|. 222 // Loads and reassociates the local tabs referenced in |tabs|.
222 // |change_output| *must* be provided as a link to the SyncChange pipeline 223 // |change_output| *must* be provided as a link to the SyncChange pipeline
223 // that exists in the caller's context. This function will append necessary 224 // that exists in the caller's context. This function will append necessary
224 // changes for processing later. 225 // changes for processing later.
225 void AssociateTab(SyncedTabDelegate* const tab, 226 void AssociateTab(SyncedTabDelegate* const tab,
226 syncer::SyncChangeList* change_output); 227 syncer::SyncChangeList* change_output);
227 228
228 // Set |session_tab| from |tab_delegate| and |mtime|. 229 // Set |session_tab| from |tab_delegate| and |mtime|.
229 void SetSessionTabFromDelegate(const SyncedTabDelegate& tab_delegate, 230 void SetSessionTabFromDelegate(const SyncedTabDelegate& tab_delegate,
230 base::Time mtime, 231 base::Time mtime,
231 sessions::SessionTab* session_tab); 232 sessions::SessionTab* session_tab,
233 TabTasks* tab_tasks);
232 234
233 // Sets |variation_ids| field of |session_tab| with the ids of the currently 235 // Sets |variation_ids| field of |session_tab| with the ids of the currently
234 // assigned variations which should be sent to sync. 236 // assigned variations which should be sent to sync.
235 static void SetVariationIds(sessions::SessionTab* session_tab); 237 static void SetVariationIds(sessions::SessionTab* session_tab);
236 238
237 // Populates |specifics| based on the data in |tab_delegate|. 239 // Populates |specifics| based on the data in |tab_delegate|.
238 void LocalTabDelegateToSpecifics(const SyncedTabDelegate& tab_delegate, 240 void LocalTabDelegateToSpecifics(const SyncedTabDelegate& tab_delegate,
239 sync_pb::SessionSpecifics* specifics); 241 sync_pb::SessionSpecifics* specifics);
240 242
241 // It's possible that when we associate windows, tabs aren't all loaded 243 // It's possible that when we associate windows, tabs aren't all loaded
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 318
317 std::unique_ptr<sync_sessions::LostNavigationsRecorder> 319 std::unique_ptr<sync_sessions::LostNavigationsRecorder>
318 lost_navigations_recorder_; 320 lost_navigations_recorder_;
319 321
320 // Callback to inform interested observer that new sessions data has arrived. 322 // Callback to inform interested observer that new sessions data has arrived.
321 base::Closure sessions_updated_callback_; 323 base::Closure sessions_updated_callback_;
322 324
323 // Callback to inform sync that a sync data refresh is requested. 325 // Callback to inform sync that a sync data refresh is requested.
324 base::Closure datatype_refresh_callback_; 326 base::Closure datatype_refresh_callback_;
325 327
328 TaskTracker task_tracker_;
329
326 DISALLOW_COPY_AND_ASSIGN(SessionsSyncManager); 330 DISALLOW_COPY_AND_ASSIGN(SessionsSyncManager);
327 }; 331 };
328 332
329 } // namespace sync_sessions 333 } // namespace sync_sessions
330 334
331 #endif // COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ 335 #endif // COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698