OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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. It 'controls' the model data | 6 // state tracking on behalf of a SyncSession. It 'controls' the model data |
7 // defined in session_state.h. The most important feature of StatusController | 7 // defined in session_state.h. The most important feature of StatusController |
8 // is the ScopedModelSafetyRestriction. When one of these is active, the | 8 // is the ScopedModelSafetyRestriction. When one of these is active, the |
9 // underlying data set exposed via accessors is swapped out to the appropriate | 9 // underlying data set exposed via accessors is swapped out to the appropriate |
10 // set for the restricted ModelSafeGroup behind the scenes. For example, if | 10 // set for the restricted ModelSafeGroup behind the scenes. For example, if |
(...skipping 18 matching lines...) Expand all Loading... |
29 // so that various parts of the sync engine can avoid broadcasting | 29 // so that various parts of the sync engine can avoid broadcasting |
30 // notifications if no changes occurred. | 30 // notifications if no changes occurred. |
31 | 31 |
32 #ifndef CHROME_BROWSER_SYNC_SESSIONS_STATUS_CONTROLLER_H_ | 32 #ifndef CHROME_BROWSER_SYNC_SESSIONS_STATUS_CONTROLLER_H_ |
33 #define CHROME_BROWSER_SYNC_SESSIONS_STATUS_CONTROLLER_H_ | 33 #define CHROME_BROWSER_SYNC_SESSIONS_STATUS_CONTROLLER_H_ |
34 #pragma once | 34 #pragma once |
35 | 35 |
36 #include <vector> | 36 #include <vector> |
37 #include <map> | 37 #include <map> |
38 | 38 |
39 #include "base/stl_util-inl.h" | 39 #include "base/stl_util.h" |
40 #include "chrome/browser/sync/sessions/ordered_commit_set.h" | 40 #include "chrome/browser/sync/sessions/ordered_commit_set.h" |
41 #include "chrome/browser/sync/sessions/session_state.h" | 41 #include "chrome/browser/sync/sessions/session_state.h" |
42 | 42 |
43 namespace browser_sync { | 43 namespace browser_sync { |
44 namespace sessions { | 44 namespace sessions { |
45 | 45 |
46 class StatusController { | 46 class StatusController { |
47 public: | 47 public: |
48 explicit StatusController(const ModelSafeRoutingInfo& routes); | 48 explicit StatusController(const ModelSafeRoutingInfo& routes); |
49 ~StatusController(); | 49 ~StatusController(); |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 } | 279 } |
280 private: | 280 private: |
281 StatusController* status_; | 281 StatusController* status_; |
282 DISALLOW_COPY_AND_ASSIGN(ScopedModelSafeGroupRestriction); | 282 DISALLOW_COPY_AND_ASSIGN(ScopedModelSafeGroupRestriction); |
283 }; | 283 }; |
284 | 284 |
285 } | 285 } |
286 } | 286 } |
287 | 287 |
288 #endif // CHROME_BROWSER_SYNC_SESSIONS_STATUS_CONTROLLER_H_ | 288 #endif // CHROME_BROWSER_SYNC_SESSIONS_STATUS_CONTROLLER_H_ |
OLD | NEW |