Chromium Code Reviews| Index: chrome/browser/sync/engine/all_status.cc |
| diff --git a/chrome/browser/sync/engine/all_status.cc b/chrome/browser/sync/engine/all_status.cc |
| index 2c2c37a7f09233a285cdd761a68ca9e6631558a7..df45448b9dfb3f57e43d01368c3f8be515fff16c 100644 |
| --- a/chrome/browser/sync/engine/all_status.cc |
| +++ b/chrome/browser/sync/engine/all_status.cc |
| @@ -12,15 +12,15 @@ |
| #include "chrome/browser/sync/protocol/service_constants.h" |
| #include "chrome/browser/sync/sessions/session_state.h" |
| #include "chrome/browser/sync/syncable/directory_manager.h" |
| +#include "chrome/browser/sync/syncable/model_type.h" |
| namespace browser_sync { |
| -static const sync_api::SyncManager::Status init_status = |
| - { sync_api::SyncManager::Status::OFFLINE }; |
| - |
| -AllStatus::AllStatus() : status_(init_status) { |
| +AllStatus::AllStatus() { |
| + status_.summary = sync_api::SyncManager::Status::OFFLINE; |
| status_.initial_sync_ended = true; |
| status_.notifications_enabled = false; |
| + status_.cryptographer_ready = false; |
|
akalin
2011/08/04 01:14:48
crypto has pending keys?
Nicolas Zea
2011/08/04 01:27:52
Done.
|
| } |
| AllStatus::~AllStatus() { |
| @@ -165,6 +165,22 @@ void AllStatus::IncrementNotificationsReceived() { |
| ++status_.notifications_received; |
| } |
| +void AllStatus::SetEncryptedTypes(const syncable::ModelTypeSet& types) { |
| + std::string encrypted_types = syncable::ModelTypeSetToString(types); |
| + ScopedStatusLock lock(this); |
| + status_.encrypted_types = encrypted_types; |
| +} |
| + |
| +void AllStatus::SetCryptographerReady(bool ready) { |
| + ScopedStatusLock lock(this); |
| + status_.cryptographer_ready = ready; |
| +} |
| + |
| +void AllStatus::SetCryptoHasPendingKeys(bool has_pending_keys) { |
| + ScopedStatusLock lock(this); |
| + status_.crypto_has_pending_keys = has_pending_keys; |
| +} |
| + |
| ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus) |
| : allstatus_(allstatus) { |
| allstatus->mutex_.Acquire(); |