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

Side by Side Diff: components/sync/core_impl/sync_manager_impl.h

Issue 2258873003: [Sync] Move sessions/ to engine/cycle/ and rename things to match. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 4 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_CORE_IMPL_SYNC_MANAGER_IMPL_H_ 5 #ifndef COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_
6 #define COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ 6 #define COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 20 matching lines...) Expand all
31 #include "components/sync/js/js_backend.h" 31 #include "components/sync/js/js_backend.h"
32 #include "components/sync/syncable/directory_change_delegate.h" 32 #include "components/sync/syncable/directory_change_delegate.h"
33 #include "net/base/network_change_notifier.h" 33 #include "net/base/network_change_notifier.h"
34 34
35 class GURL; 35 class GURL;
36 36
37 namespace syncer { 37 namespace syncer {
38 38
39 class ModelTypeRegistry; 39 class ModelTypeRegistry;
40 class SyncAPIServerConnectionManager; 40 class SyncAPIServerConnectionManager;
41 class SyncCycleContext;
41 class TypeDebugInfoObserver; 42 class TypeDebugInfoObserver;
42 class WriteNode; 43 class WriteNode;
43 class WriteTransaction; 44 class WriteTransaction;
44 45
45 namespace sessions {
46 class SyncSessionContext;
47 }
48
49 // SyncManager encapsulates syncable::Directory and serves as the parent of all 46 // SyncManager encapsulates syncable::Directory and serves as the parent of all
50 // other objects in the sync API. If multiple threads interact with the same 47 // other objects in the sync API. If multiple threads interact with the same
51 // local sync repository (i.e. the same sqlite database), they should share a 48 // local sync repository (i.e. the same sqlite database), they should share a
52 // single SyncManager instance. The caller should typically create one 49 // single SyncManager instance. The caller should typically create one
53 // SyncManager for the lifetime of a user session. 50 // SyncManager for the lifetime of a user session.
54 // 51 //
55 // Unless stated otherwise, all methods of SyncManager should be called on the 52 // Unless stated otherwise, all methods of SyncManager should be called on the
56 // same thread. 53 // same thread.
57 class SyncManagerImpl 54 class SyncManagerImpl
58 : public SyncManager, 55 : public SyncManager,
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 279
283 // The ServerConnectionManager used to abstract communication between the 280 // The ServerConnectionManager used to abstract communication between the
284 // client (the Syncer) and the sync server. 281 // client (the Syncer) and the sync server.
285 std::unique_ptr<SyncAPIServerConnectionManager> connection_manager_; 282 std::unique_ptr<SyncAPIServerConnectionManager> connection_manager_;
286 283
287 // Maintains state that affects the way we interact with different sync types. 284 // Maintains state that affects the way we interact with different sync types.
288 // This state changes when entering or exiting a configuration cycle. 285 // This state changes when entering or exiting a configuration cycle.
289 std::unique_ptr<ModelTypeRegistry> model_type_registry_; 286 std::unique_ptr<ModelTypeRegistry> model_type_registry_;
290 287
291 // A container of various bits of information used by the SyncScheduler to 288 // A container of various bits of information used by the SyncScheduler to
292 // create SyncSessions. Must outlive the SyncScheduler. 289 // create SyncCycles. Must outlive the SyncScheduler.
293 std::unique_ptr<sessions::SyncSessionContext> session_context_; 290 std::unique_ptr<SyncCycleContext> cycle_context_;
294 291
295 // The scheduler that runs the Syncer. Needs to be explicitly 292 // The scheduler that runs the Syncer. Needs to be explicitly
296 // Start()ed. 293 // Start()ed.
297 std::unique_ptr<SyncScheduler> scheduler_; 294 std::unique_ptr<SyncScheduler> scheduler_;
298 295
299 // A multi-purpose status watch object that aggregates stats from various 296 // A multi-purpose status watch object that aggregates stats from various
300 // sync components. 297 // sync components.
301 AllStatus allstatus_; 298 AllStatus allstatus_;
302 299
303 // Each element of this map is a store of change records produced by 300 // Each element of this map is a store of change records produced by
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 std::unique_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; 335 std::unique_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_;
339 336
340 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; 337 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_;
341 338
342 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); 339 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl);
343 }; 340 };
344 341
345 } // namespace syncer 342 } // namespace syncer
346 343
347 #endif // COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ 344 #endif // COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « components/sync/core_impl/js_sync_manager_observer_unittest.cc ('k') | components/sync/core_impl/sync_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698