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

Side by Side Diff: components/sync/sessions_impl/sync_session.h

Issue 2240613002: [Sync] Convert sync to a static library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try getting rid of sync_core source set. 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 // A class representing an attempt to synchronize the local syncable data 5 // A class representing an attempt to synchronize the local syncable data
6 // store with a sync server. A SyncSession instance is passed as a stateful 6 // store with a sync server. A SyncSession instance is passed as a stateful
7 // bundle throughout the sync cycle. The SyncSession is not reused across 7 // bundle throughout the sync cycle. The SyncSession is not reused across
8 // sync cycles; each cycle starts with a new one. 8 // sync cycles; each cycle starts with a new one.
9 9
10 #ifndef COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_H_ 10 #ifndef COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_H_
11 #define COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_H_ 11 #define COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_H_
12 12
13 #include <map> 13 #include <map>
14 #include <memory> 14 #include <memory>
15 #include <set> 15 #include <set>
16 #include <string> 16 #include <string>
17 #include <utility> 17 #include <utility>
18 #include <vector> 18 #include <vector>
19 19
20 #include "base/macros.h" 20 #include "base/macros.h"
21 #include "base/time/time.h" 21 #include "base/time/time.h"
22 #include "components/sync/base/model_type.h" 22 #include "components/sync/base/model_type.h"
23 #include "components/sync/base/sync_export.h"
24 #include "components/sync/engine/model_safe_worker.h" 23 #include "components/sync/engine/model_safe_worker.h"
25 #include "components/sync/engine_impl/sync_cycle_event.h" 24 #include "components/sync/engine_impl/sync_cycle_event.h"
26 #include "components/sync/protocol/sync_protocol_error.h" 25 #include "components/sync/protocol/sync_protocol_error.h"
27 #include "components/sync/sessions/sync_session_snapshot.h" 26 #include "components/sync/sessions/sync_session_snapshot.h"
28 #include "components/sync/sessions_impl/status_controller.h" 27 #include "components/sync/sessions_impl/status_controller.h"
29 #include "components/sync/sessions_impl/sync_session_context.h" 28 #include "components/sync/sessions_impl/sync_session_context.h"
30 29
31 namespace syncer { 30 namespace syncer {
32 class ModelSafeWorker; 31 class ModelSafeWorker;
33 class ProtocolEvent; 32 class ProtocolEvent;
34 33
35 namespace sessions { 34 namespace sessions {
36 35
37 class NudgeTracker; 36 class NudgeTracker;
38 37
39 class SYNC_EXPORT SyncSession { 38 class SyncSession {
40 public: 39 public:
41 // The Delegate services events that occur during the session requiring an 40 // The Delegate services events that occur during the session requiring an
42 // explicit (and session-global) action, as opposed to events that are simply 41 // explicit (and session-global) action, as opposed to events that are simply
43 // recorded in per-session state. 42 // recorded in per-session state.
44 class SYNC_EXPORT Delegate { 43 class Delegate {
45 public: 44 public:
46 // The client was throttled and should cease-and-desist syncing activity 45 // The client was throttled and should cease-and-desist syncing activity
47 // until the specified time. 46 // until the specified time.
48 virtual void OnThrottled(const base::TimeDelta& throttle_duration) = 0; 47 virtual void OnThrottled(const base::TimeDelta& throttle_duration) = 0;
49 48
50 // Some of the client's types were throttled. 49 // Some of the client's types were throttled.
51 virtual void OnTypesThrottled(ModelTypeSet types, 50 virtual void OnTypesThrottled(ModelTypeSet types,
52 const base::TimeDelta& throttle_duration) = 0; 51 const base::TimeDelta& throttle_duration) = 0;
53 52
54 // Silenced intervals can be out of phase with individual sessions, so the 53 // Silenced intervals can be out of phase with individual sessions, so the
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // Our controller for various status and error counters. 131 // Our controller for various status and error counters.
133 std::unique_ptr<StatusController> status_controller_; 132 std::unique_ptr<StatusController> status_controller_;
134 133
135 DISALLOW_COPY_AND_ASSIGN(SyncSession); 134 DISALLOW_COPY_AND_ASSIGN(SyncSession);
136 }; 135 };
137 136
138 } // namespace sessions 137 } // namespace sessions
139 } // namespace syncer 138 } // namespace syncer
140 139
141 #endif // COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_H_ 140 #endif // COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_H_
OLDNEW
« no previous file with comments | « components/sync/sessions_impl/status_controller.h ('k') | components/sync/sessions_impl/sync_session_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698