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

Side by Side Diff: sync/sessions/status_controller.h

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « sync/sessions/session_state_unittest.cc ('k') | sync/sessions/status_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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. 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 25 matching lines...) Expand all
36 #include <map> 36 #include <map>
37 #include <vector> 37 #include <vector>
38 38
39 #include "base/logging.h" 39 #include "base/logging.h"
40 #include "base/stl_util.h" 40 #include "base/stl_util.h"
41 #include "base/time.h" 41 #include "base/time.h"
42 #include "sync/internal_api/public/sessions/model_neutral_state.h" 42 #include "sync/internal_api/public/sessions/model_neutral_state.h"
43 #include "sync/sessions/ordered_commit_set.h" 43 #include "sync/sessions/ordered_commit_set.h"
44 #include "sync/sessions/session_state.h" 44 #include "sync/sessions/session_state.h"
45 45
46 namespace csync { 46 namespace syncer {
47 namespace sessions { 47 namespace sessions {
48 48
49 class StatusController { 49 class StatusController {
50 public: 50 public:
51 explicit StatusController(const ModelSafeRoutingInfo& routes); 51 explicit StatusController(const ModelSafeRoutingInfo& routes);
52 ~StatusController(); 52 ~StatusController();
53 53
54 // Progress counters. All const methods may return NULL if the 54 // Progress counters. All const methods may return NULL if the
55 // progress structure doesn't exist, but all non-const methods 55 // progress structure doesn't exist, but all non-const methods
56 // auto-create. 56 // auto-create.
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 ~ScopedModelSafeGroupRestriction() { 228 ~ScopedModelSafeGroupRestriction() {
229 DCHECK(status_->group_restriction_in_effect_); 229 DCHECK(status_->group_restriction_in_effect_);
230 status_->group_restriction_in_effect_ = false; 230 status_->group_restriction_in_effect_ = false;
231 } 231 }
232 private: 232 private:
233 StatusController* status_; 233 StatusController* status_;
234 DISALLOW_COPY_AND_ASSIGN(ScopedModelSafeGroupRestriction); 234 DISALLOW_COPY_AND_ASSIGN(ScopedModelSafeGroupRestriction);
235 }; 235 };
236 236
237 } 237 } // namespace sessions
238 } 238 } // namespace syncer
239 239
240 #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_ 240 #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_
OLDNEW
« no previous file with comments | « sync/sessions/session_state_unittest.cc ('k') | sync/sessions/status_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698