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

Side by Side Diff: components/sync/engine_impl/sync_scheduler.h

Issue 2641523004: [Sync] Make directory types registration explicit in ModelTypeRegistry (Closed)
Patch Set: Address comments Created 3 years, 11 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_ENGINE_IMPL_SYNC_SCHEDULER_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_H_
6 #define COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_H_ 6 #define COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "components/sync/base/invalidation_interface.h" 14 #include "components/sync/base/invalidation_interface.h"
15 #include "components/sync/engine_impl/cycle/sync_cycle.h" 15 #include "components/sync/engine_impl/cycle/sync_cycle.h"
16 #include "components/sync/engine_impl/nudge_source.h" 16 #include "components/sync/engine_impl/nudge_source.h"
17 17
18 namespace tracked_objects { 18 namespace tracked_objects {
19 class Location; 19 class Location;
20 } // namespace tracked_objects 20 } // namespace tracked_objects
21 21
22 namespace syncer { 22 namespace syncer {
23 23
24 struct ConfigurationParams { 24 struct ConfigurationParams {
25 ConfigurationParams(); 25 ConfigurationParams();
26 ConfigurationParams( 26 ConfigurationParams(
27 const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& source, 27 const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& source,
28 ModelTypeSet types_to_download, 28 ModelTypeSet types_to_download,
29 const ModelSafeRoutingInfo& routing_info,
30 const base::Closure& ready_task, 29 const base::Closure& ready_task,
31 const base::Closure& retry_task); 30 const base::Closure& retry_task);
32 ConfigurationParams(const ConfigurationParams& other); 31 ConfigurationParams(const ConfigurationParams& other);
33 ~ConfigurationParams(); 32 ~ConfigurationParams();
34 33
35 // Source for the configuration. 34 // Source for the configuration.
36 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source; 35 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source;
37 // The types that should be downloaded. 36 // The types that should be downloaded.
38 ModelTypeSet types_to_download; 37 ModelTypeSet types_to_download;
39 // The new routing info (superset of types to be downloaded).
40 ModelSafeRoutingInfo routing_info;
41 // Callback to invoke on configuration completion. 38 // Callback to invoke on configuration completion.
42 base::Closure ready_task; 39 base::Closure ready_task;
43 // Callback to invoke on configuration failure. 40 // Callback to invoke on configuration failure.
44 base::Closure retry_task; 41 base::Closure retry_task;
45 }; 42 };
46 43
47 struct ClearParams { 44 struct ClearParams {
48 explicit ClearParams(const base::Closure& report_success_task); 45 explicit ClearParams(const base::Closure& report_success_task);
49 ClearParams(const ClearParams& other); 46 ClearParams(const ClearParams& other);
50 ~ClearParams(); 47 ~ClearParams();
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Called when credentials are updated by the user. 144 // Called when credentials are updated by the user.
148 virtual void OnCredentialsUpdated() = 0; 145 virtual void OnCredentialsUpdated() = 0;
149 146
150 // Called when the network layer detects a connection status change. 147 // Called when the network layer detects a connection status change.
151 virtual void OnConnectionStatusChange() = 0; 148 virtual void OnConnectionStatusChange() = 0;
152 }; 149 };
153 150
154 } // namespace syncer 151 } // namespace syncer
155 152
156 #endif // COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_H_ 153 #endif // COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_H_
OLDNEW
« no previous file with comments | « components/sync/engine_impl/sync_manager_impl_unittest.cc ('k') | components/sync/engine_impl/sync_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698