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

Side by Side Diff: sync/engine/all_status.cc

Issue 10696087: [Sync] Move ModelType and related classes to 'syncer' namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort headers, update copyrights 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/engine/all_status.h ('k') | sync/engine/apply_updates_command.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 #include "sync/engine/all_status.h" 5 #include "sync/engine/all_status.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/port.h" 10 #include "base/port.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void AllStatus::SetNotificationsEnabled(bool notifications_enabled) { 128 void AllStatus::SetNotificationsEnabled(bool notifications_enabled) {
129 ScopedStatusLock lock(this); 129 ScopedStatusLock lock(this);
130 status_.notifications_enabled = notifications_enabled; 130 status_.notifications_enabled = notifications_enabled;
131 } 131 }
132 132
133 void AllStatus::IncrementNotificationsReceived() { 133 void AllStatus::IncrementNotificationsReceived() {
134 ScopedStatusLock lock(this); 134 ScopedStatusLock lock(this);
135 ++status_.notifications_received; 135 ++status_.notifications_received;
136 } 136 }
137 137
138 void AllStatus::SetEncryptedTypes(syncable::ModelTypeSet types) { 138 void AllStatus::SetEncryptedTypes(syncer::ModelTypeSet types) {
139 ScopedStatusLock lock(this); 139 ScopedStatusLock lock(this);
140 status_.encrypted_types = types; 140 status_.encrypted_types = types;
141 } 141 }
142 142
143 void AllStatus::SetThrottledTypes(const syncable::ModelTypeSet& types) { 143 void AllStatus::SetThrottledTypes(const syncer::ModelTypeSet& types) {
144 ScopedStatusLock lock(this); 144 ScopedStatusLock lock(this);
145 status_.throttled_types = types; 145 status_.throttled_types = types;
146 } 146 }
147 147
148 void AllStatus::SetCryptographerReady(bool ready) { 148 void AllStatus::SetCryptographerReady(bool ready) {
149 ScopedStatusLock lock(this); 149 ScopedStatusLock lock(this);
150 status_.cryptographer_ready = ready; 150 status_.cryptographer_ready = ready;
151 } 151 }
152 152
153 void AllStatus::SetCryptoHasPendingKeys(bool has_pending_keys) { 153 void AllStatus::SetCryptoHasPendingKeys(bool has_pending_keys) {
154 ScopedStatusLock lock(this); 154 ScopedStatusLock lock(this);
155 status_.crypto_has_pending_keys = has_pending_keys; 155 status_.crypto_has_pending_keys = has_pending_keys;
156 } 156 }
157 157
158 void AllStatus::SetUniqueId(const std::string& guid) { 158 void AllStatus::SetUniqueId(const std::string& guid) {
159 ScopedStatusLock lock(this); 159 ScopedStatusLock lock(this);
160 status_.unique_id = guid; 160 status_.unique_id = guid;
161 } 161 }
162 162
163 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus) 163 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus)
164 : allstatus_(allstatus) { 164 : allstatus_(allstatus) {
165 allstatus->mutex_.Acquire(); 165 allstatus->mutex_.Acquire();
166 } 166 }
167 167
168 ScopedStatusLock::~ScopedStatusLock() { 168 ScopedStatusLock::~ScopedStatusLock() {
169 allstatus_->mutex_.Release(); 169 allstatus_->mutex_.Release();
170 } 170 }
171 171
172 } // namespace syncer 172 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/all_status.h ('k') | sync/engine/apply_updates_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698