OLD | NEW |
1 // Copyright (c) 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 // StatusController handles all counter and status related number crunching and | 5 // StatusController handles all counter and status related number crunching and |
6 // state tracking on behalf of a SyncSession. | 6 // state tracking on behalf of a SyncSession. |
7 // | 7 // |
8 // The most important feature of StatusController is the | 8 // The most important feature of StatusController is the |
9 // ScopedModelSafeGroupRestriction. Some of its functions expose per-thread | 9 // ScopedModelSafeGroupRestriction. Some of its functions expose per-thread |
10 // state, and can be called only when the restriction is in effect. For | 10 // state, and can be called only when the restriction is in effect. For |
11 // example, if GROUP_UI is set then the value returned from | 11 // example, if GROUP_UI is set then the value returned from |
(...skipping 15 matching lines...) Expand all Loading... |
27 | 27 |
28 #ifndef SYNC_SESSIONS_STATUS_CONTROLLER_H_ | 28 #ifndef SYNC_SESSIONS_STATUS_CONTROLLER_H_ |
29 #define SYNC_SESSIONS_STATUS_CONTROLLER_H_ | 29 #define SYNC_SESSIONS_STATUS_CONTROLLER_H_ |
30 | 30 |
31 #include <map> | 31 #include <map> |
32 #include <vector> | 32 #include <vector> |
33 | 33 |
34 #include "base/logging.h" | 34 #include "base/logging.h" |
35 #include "base/stl_util.h" | 35 #include "base/stl_util.h" |
36 #include "base/time.h" | 36 #include "base/time.h" |
| 37 #include "sync/base/sync_export.h" |
37 #include "sync/internal_api/public/sessions/model_neutral_state.h" | 38 #include "sync/internal_api/public/sessions/model_neutral_state.h" |
38 #include "sync/sessions/ordered_commit_set.h" | 39 #include "sync/sessions/ordered_commit_set.h" |
39 | 40 |
40 namespace syncer { | 41 namespace syncer { |
41 namespace sessions { | 42 namespace sessions { |
42 | 43 |
43 class StatusController { | 44 class SYNC_EXPORT_PRIVATE StatusController { |
44 public: | 45 public: |
45 explicit StatusController(const ModelSafeRoutingInfo& routes); | 46 explicit StatusController(const ModelSafeRoutingInfo& routes); |
46 ~StatusController(); | 47 ~StatusController(); |
47 | 48 |
48 // ClientToServer messages. | 49 // ClientToServer messages. |
49 const ModelTypeSet updates_request_types() const { | 50 const ModelTypeSet updates_request_types() const { |
50 return model_neutral_.updates_request_types; | 51 return model_neutral_.updates_request_types; |
51 } | 52 } |
52 void set_updates_request_types(ModelTypeSet value) { | 53 void set_updates_request_types(ModelTypeSet value) { |
53 model_neutral_.updates_request_types = value; | 54 model_neutral_.updates_request_types = value; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 201 } |
201 private: | 202 private: |
202 StatusController* status_; | 203 StatusController* status_; |
203 DISALLOW_COPY_AND_ASSIGN(ScopedModelSafeGroupRestriction); | 204 DISALLOW_COPY_AND_ASSIGN(ScopedModelSafeGroupRestriction); |
204 }; | 205 }; |
205 | 206 |
206 } // namespace sessions | 207 } // namespace sessions |
207 } // namespace syncer | 208 } // namespace syncer |
208 | 209 |
209 #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_ | 210 #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_ |
OLD | NEW |