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

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

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 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 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 15 matching lines...) Expand all
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/tab_node_pool.h" 33 #include "components/sync_sessions/tab_node_pool.h"
34 34
35 namespace syncer { 35 namespace syncer {
36 class SyncErrorFactory;
37 }
38
39 namespace sync_driver {
36 class LocalDeviceInfoProvider; 40 class LocalDeviceInfoProvider;
37 class SyncErrorFactory;
38 class SyncPrefs; 41 class SyncPrefs;
39 } // namespace syncer 42 }
40 43
41 namespace sync_pb { 44 namespace sync_pb {
42 class SessionHeader; 45 class SessionHeader;
43 class SessionSpecifics; 46 class SessionSpecifics;
44 class SessionTab; 47 class SessionTab;
45 class SessionWindow; 48 class SessionWindow;
46 class TabNavigation; 49 class TabNavigation;
47 } // namespace sync_pb 50 } // namespace sync_pb
48 51
49 namespace extensions { 52 namespace extensions {
50 class ExtensionSessionsTest; 53 class ExtensionSessionsTest;
51 } // namespace extensions 54 } // namespace extensions
52 55
53 namespace sync_sessions { 56 namespace sync_sessions {
54 57
55 class SyncedTabDelegate; 58 class SyncedTabDelegate;
56 class SyncedWindowDelegatesGetter; 59 class SyncedWindowDelegatesGetter;
57 60
58 // Contains all logic for associating the Chrome sessions model and 61 // Contains all logic for associating the Chrome sessions model and
59 // the sync sessions model. 62 // the sync sessions model.
60 class SessionsSyncManager : public syncer::SyncableService, 63 class SessionsSyncManager : public syncer::SyncableService,
61 public OpenTabsUIDelegate, 64 public OpenTabsUIDelegate,
62 public LocalSessionEventHandler { 65 public LocalSessionEventHandler {
63 public: 66 public:
64 SessionsSyncManager(SyncSessionsClient* sessions_client, 67 SessionsSyncManager(SyncSessionsClient* sessions_client,
65 syncer::SyncPrefs* sync_prefs, 68 sync_driver::SyncPrefs* sync_prefs,
66 syncer::LocalDeviceInfoProvider* local_device, 69 sync_driver::LocalDeviceInfoProvider* local_device,
67 std::unique_ptr<LocalSessionEventRouter> router, 70 std::unique_ptr<LocalSessionEventRouter> router,
68 const base::Closure& sessions_updated_callback, 71 const base::Closure& sessions_updated_callback,
69 const base::Closure& datatype_refresh_callback); 72 const base::Closure& datatype_refresh_callback);
70 ~SessionsSyncManager() override; 73 ~SessionsSyncManager() override;
71 74
72 // syncer::SyncableService implementation. 75 // syncer::SyncableService implementation.
73 syncer::SyncMergeResult MergeDataAndStartSyncing( 76 syncer::SyncMergeResult MergeDataAndStartSyncing(
74 syncer::ModelType type, 77 syncer::ModelType type,
75 const syncer::SyncDataList& initial_sync_data, 78 const syncer::SyncDataList& initial_sync_data,
76 std::unique_ptr<syncer::SyncChangeProcessor> sync_processor, 79 std::unique_ptr<syncer::SyncChangeProcessor> sync_processor,
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 337
335 // Tracks whether our local representation of which sync nodes map to what 338 // Tracks whether our local representation of which sync nodes map to what
336 // tabs (belonging to the current local session) is inconsistent. This can 339 // tabs (belonging to the current local session) is inconsistent. This can
337 // happen if a foreign client deems our session as "stale" and decides to 340 // happen if a foreign client deems our session as "stale" and decides to
338 // delete it. Rather than respond by bullishly re-creating our nodes 341 // delete it. Rather than respond by bullishly re-creating our nodes
339 // immediately, which could lead to ping-pong sequences, we give the benefit 342 // immediately, which could lead to ping-pong sequences, we give the benefit
340 // of the doubt and hold off until another local navigation occurs, which 343 // of the doubt and hold off until another local navigation occurs, which
341 // proves that we are still relevant. 344 // proves that we are still relevant.
342 bool local_tab_pool_out_of_sync_; 345 bool local_tab_pool_out_of_sync_;
343 346
344 syncer::SyncPrefs* sync_prefs_; 347 sync_driver::SyncPrefs* sync_prefs_;
345 348
346 std::unique_ptr<syncer::SyncErrorFactory> error_handler_; 349 std::unique_ptr<syncer::SyncErrorFactory> error_handler_;
347 std::unique_ptr<syncer::SyncChangeProcessor> sync_processor_; 350 std::unique_ptr<syncer::SyncChangeProcessor> sync_processor_;
348 351
349 // Local device info provider, owned by ProfileSyncService. 352 // Local device info provider, owned by ProfileSyncService.
350 const syncer::LocalDeviceInfoProvider* const local_device_; 353 const sync_driver::LocalDeviceInfoProvider* const local_device_;
351 354
352 // Unique client tag. 355 // Unique client tag.
353 std::string current_machine_tag_; 356 std::string current_machine_tag_;
354 357
355 // User-visible machine name. 358 // User-visible machine name.
356 std::string current_session_name_; 359 std::string current_session_name_;
357 360
358 // SyncID for the sync node containing all the window information for this 361 // SyncID for the sync node containing all the window information for this
359 // client. 362 // client.
360 int local_session_header_node_id_; 363 int local_session_header_node_id_;
(...skipping 15 matching lines...) Expand all
376 379
377 // Callback to inform sync that a sync data refresh is requested. 380 // Callback to inform sync that a sync data refresh is requested.
378 base::Closure datatype_refresh_callback_; 381 base::Closure datatype_refresh_callback_;
379 382
380 DISALLOW_COPY_AND_ASSIGN(SessionsSyncManager); 383 DISALLOW_COPY_AND_ASSIGN(SessionsSyncManager);
381 }; 384 };
382 385
383 } // namespace sync_sessions 386 } // namespace sync_sessions
384 387
385 #endif // COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ 388 #endif // COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « components/sync_sessions/session_data_type_controller_unittest.cc ('k') | components/sync_sessions/sessions_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698