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 #include "chrome/browser/sync/engine/all_status.h" | 5 #include "chrome/browser/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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 void AllStatus::IncrementNotifiableCommits() { | 166 void AllStatus::IncrementNotifiableCommits() { |
167 ScopedStatusLock lock(this); | 167 ScopedStatusLock lock(this); |
168 ++status_.notifiable_commits; | 168 ++status_.notifiable_commits; |
169 } | 169 } |
170 | 170 |
171 void AllStatus::IncrementNotificationsReceived() { | 171 void AllStatus::IncrementNotificationsReceived() { |
172 ScopedStatusLock lock(this); | 172 ScopedStatusLock lock(this); |
173 ++status_.notifications_received; | 173 ++status_.notifications_received; |
174 } | 174 } |
175 | 175 |
176 void AllStatus::SetEncryptedTypes(syncable::ModelEnumSet types) { | 176 void AllStatus::SetEncryptedTypes(syncable::ModelTypeSet types) { |
177 ScopedStatusLock lock(this); | 177 ScopedStatusLock lock(this); |
178 status_.encrypted_types = types; | 178 status_.encrypted_types = types; |
179 } | 179 } |
180 | 180 |
181 void AllStatus::SetCryptographerReady(bool ready) { | 181 void AllStatus::SetCryptographerReady(bool ready) { |
182 ScopedStatusLock lock(this); | 182 ScopedStatusLock lock(this); |
183 status_.cryptographer_ready = ready; | 183 status_.cryptographer_ready = ready; |
184 } | 184 } |
185 | 185 |
186 void AllStatus::SetCryptoHasPendingKeys(bool has_pending_keys) { | 186 void AllStatus::SetCryptoHasPendingKeys(bool has_pending_keys) { |
(...skipping 10 matching lines...) Expand all Loading... |
197 : allstatus_(allstatus) { | 197 : allstatus_(allstatus) { |
198 allstatus->mutex_.Acquire(); | 198 allstatus->mutex_.Acquire(); |
199 } | 199 } |
200 | 200 |
201 ScopedStatusLock::~ScopedStatusLock() { | 201 ScopedStatusLock::~ScopedStatusLock() { |
202 allstatus_->CalcStatusChanges(); | 202 allstatus_->CalcStatusChanges(); |
203 allstatus_->mutex_.Release(); | 203 allstatus_->mutex_.Release(); |
204 } | 204 } |
205 | 205 |
206 } // namespace browser_sync | 206 } // namespace browser_sync |
OLD | NEW |